Skip to content

Commit

Permalink
Merge pull request #3 from cssnano/fix-bug
Browse files Browse the repository at this point in the history
fix: bug with dependencies
  • Loading branch information
anikethsaha authored Sep 8, 2020
2 parents 283fd9c + 91d4865 commit d2fc132
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 48 deletions.
57 changes: 9 additions & 48 deletions dependenciesList.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,10 @@ const version = "nightly";

module.exports = {
cssnano: {
cosmiconfig: "^5.2.1",
"cssnano-preset-default": version,
"is-resolvable": "^1.1.0",
"opencollective-postinstall": "^2.0.2",
postcss: "^7.0.16"
},
"cssnano-preset-default": {
"css-declaration-sorter": "^5.1.2",
"cssnano-utils": version,
postcss: "^7.0.16",
"postcss-calc": "^7.0.1",
"postcss-colormin": version,
"postcss-convert-values": version,
"postcss-discard-comments": version,
Expand Down Expand Up @@ -41,7 +34,6 @@ module.exports = {
"postcss-unique-selectors": version
},
"cssnano-preset-advanced": {
autoprefixer: "^9.5.1",
"cssnano-preset-default": version,
"postcss-discard-unused": version,
"postcss-merge-idents": version,
Expand All @@ -50,69 +42,38 @@ module.exports = {
},
"cssnano-preset-lite": {
"cssnano-utils": version,
postcss: "^7.0.16",
"postcss-discard-comments": version,
"postcss-normalize-whitespace": version,
"postcss-discard-empty": version
},
"postcss-merge-longhand": {
"css-color-names": "^1.0.1",
postcss: "^7.0.16",
"postcss-value-parser": "^3.3.1",
stylehacks: version
},
"postcss-merge-idents": {
"cssnano-utils": version,
has: "^1.0.3",
postcss: "^7.0.16",
"postcss-value-parser": "^3.3.1"
"cssnano-utils": version
},
"postcss-merge-rules": {
browserslist: "^4.6.0",
"caniuse-api": "^3.0.0",
"cssnano-utils": version,
postcss: "^7.0.16",
"postcss-selector-parser": "^3.1.1",
vendors: "^1.0.3"
"cssnano-utils": version
},
"postcss-minify-gradients": {
"cssnano-utils": version,
"is-color-stop": "^1.1.0",
postcss: "^7.0.16",
"postcss-value-parser": "^3.3.1"
"cssnano-utils": version
},
"postcss-minify-params": {
"alphanum-sort": "^1.0.2",
browserslist: "^4.6.0",
"cssnano-utils": version,
postcss: "^7.0.16",
"postcss-value-parser": "^3.3.1",
uniqs: "^2.0.0"
"cssnano-utils": version
},
"postcss-normalize-display-values": {
"cssnano-utils": version,
postcss: "^7.0.16",
"postcss-value-parser": "^3.3.1"
"cssnano-utils": version
},
"postcss-normalize-repeat-style": {
"cssnano-utils": version,
postcss: "^7.0.16",
"postcss-value-parser": "^3.3.1"
"cssnano-utils": version
},
"postcss-normalize-timing-functions": {
"cssnano-utils": version,
postcss: "^7.0.16",
"postcss-value-parser": "^3.3.1"
"cssnano-utils": version
},
"postcss-ordered-values": {
"cssnano-utils": version,
postcss: "^7.0.16",
"postcss-value-parser": "^3.3.1"
"cssnano-utils": version
},
"postcss-reduce-transforms": {
"cssnano-utils": version,
has: "^1.0.3",
postcss: "^7.0.16",
"postcss-value-parser": "^3.3.1"
"cssnano-utils": version
}
};
3 changes: 3 additions & 0 deletions publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ module.exports = async function run(registryUrl = registry) {

const packagesList = shell.ls("packages/");
const packagePath = cssnanoPath + "/packages";

packagesList.forEach(pkg => {
if (ignore.has(pkg)) {
rimraf.sync(path.resolve(packagePath, pkg));
Expand Down Expand Up @@ -80,13 +81,15 @@ module.exports = async function run(registryUrl = registry) {
if (fs.existsSync(pkgPath + "/dist")) {
shell.cd(pkgPath);
let packageJson = editJsonFile(`${pkgPath}/package.json`);

packageJson.set("scripts.prepublish", "");
packageJson.set("scripts.prebuild", "");
packageJson.set("version", `${version}-nightly.${fullVersion}`);
// packageJson.set("publishConfig.registry", registryUrl);

if (newdepList[pkg]) {
packageJson.set("dependencies", {
...packageJson.get("dependencies"),
...newdepList[pkg]
});
}
Expand Down

0 comments on commit d2fc132

Please sign in to comment.