Skip to content

Commit

Permalink
chore: use workspaces (#1140)
Browse files Browse the repository at this point in the history
* Replace deprecated prepublish with prepare
* Ensure packages build before testing by running the prepare script through lerna
  • Loading branch information
ludofischer committed Jun 3, 2021
1 parent a63dabf commit 36cef92
Show file tree
Hide file tree
Showing 78 changed files with 982 additions and 3,294 deletions.
1 change: 1 addition & 0 deletions lerna.json
@@ -1,5 +1,6 @@
{
"npmClient": "yarn",
"useWorkspaces": true,
"command": {
"publish": {
"ignoreChanges": ["yarn.lock"]
Expand Down
5 changes: 4 additions & 1 deletion package.json
Expand Up @@ -5,7 +5,7 @@
"all-contributors": "all-contributors add",
"lint": "eslint . --cache --ignore-path .gitignore",
"fixlint": "yarn lint -- --fix",
"postinstall": "lerna bootstrap",
"prepare": "lerna run --stream prepare",
"build:packages": "babel-node ./util/buildPackages.js",
"build:metadata": "babel-node ./util/buildMetadata.js",
"build:docs": "remark site/docs/**/*.md -o && yarn build:metadata && babel-node ./util/buildSiteMarkdown.js",
Expand All @@ -17,6 +17,9 @@
"deploy": "cd site && GIT_USER=anikethsaha yarn deploy",
"publish": "lerna publish"
},
"workspaces": [
"./packages/*"
],
"engines": {
"node": "^10 || ^12 || >=14"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/css-size/package.json
Expand Up @@ -10,7 +10,7 @@
"scripts": {
"prebuild": "del-cli dist",
"build": "cross-env BABEL_ENV=publish babel src --config-file ../../babel.config.json --out-dir dist --ignore \"**/__tests__/\"",
"prepublish": "yarn build"
"prepare": "yarn build"
},
"files": [
"LICENSE-MIT",
Expand Down
118 changes: 0 additions & 118 deletions packages/css-size/yarn.lock

This file was deleted.

2 changes: 1 addition & 1 deletion packages/cssnano-preset-advanced/package.json
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"prebuild": "del-cli dist",
"build": "cross-env BABEL_ENV=publish babel src --config-file ../../babel.config.json --out-dir dist --ignore \"**/__tests__/\"",
"prepublish": "yarn build"
"prepare": "yarn build"
},
"files": [
"LICENSE-MIT",
Expand Down
85 changes: 0 additions & 85 deletions packages/cssnano-preset-advanced/yarn.lock

This file was deleted.

2 changes: 1 addition & 1 deletion packages/cssnano-preset-default/package.json
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"prebuild": "del-cli dist",
"build": "cross-env BABEL_ENV=publish babel src --config-file ../../babel.config.json --out-dir dist --ignore \"**/__tests__/\"",
"prepublish": "yarn build"
"prepare": "yarn build"
},
"files": [
"LICENSE-MIT",
Expand Down
70 changes: 0 additions & 70 deletions packages/cssnano-preset-default/yarn.lock

This file was deleted.

2 changes: 1 addition & 1 deletion packages/cssnano-preset-lite/package.json
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"prebuild": "del-cli dist",
"build": "cross-env BABEL_ENV=publish babel src --config-file ../../babel.config.json --out-dir dist --ignore \"**/__tests__/\"",
"prepublish": "yarn build"
"prepare": "yarn build"
},
"files": [
"LICENSE-MIT",
Expand Down
27 changes: 0 additions & 27 deletions packages/cssnano-preset-lite/yarn.lock

This file was deleted.

2 changes: 1 addition & 1 deletion packages/cssnano-utils/package.json
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"prebuild": "del-cli dist",
"build": "cross-env BABEL_ENV=publish babel src --config-file ../../babel.config.json --out-dir dist --ignore \"**/__tests__/\"",
"prepublish": "yarn build"
"prepare": "yarn build"
},
"homepage": "https://github.com/cssnano/cssnano",
"bugs": {
Expand Down

0 comments on commit 36cef92

Please sign in to comment.