Skip to content

Commit

Permalink
Chore(ci): Yarn do not support pre and post hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Feb 20, 2024
1 parent d6b875f commit fea26e9
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 14 deletions.
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
],
"scripts": {
"start": "yarn packages:start",
"prebuild": "yarn packages:build:libs",
"build": "yarn packages:build:web",
"build": "npm-run-all --serial packages:build:libs packages:build:web",
"es:lint": "eslint ./",
"es:lint:fix": "yarn es:lint --fix",
"commit:lint:test": "yarn commitlint --from HEAD~1 --to HEAD --verbose",
Expand All @@ -42,8 +41,8 @@
"packages:start": "lerna run start --parallel",
"packages:test": "lerna run test",
"packages:types": "lerna run types --no-sort",
"packages:build:libs": "lerna run build --ignore=@lmc-eu/spirit-web*",
"packages:build:web": "lerna run build --scope=@lmc-eu/spirit-web*",
"packages:build:libs": "lerna run build --ignore '@lmc-eu/spirit-web*'",
"packages:build:web": "lerna run build --scope '@lmc-eu/spirit-web*'",
"packages:publish": "lerna publish",
"packages:diff": "lerna diff",
"packages:changed": "lerna changed",
Expand Down
4 changes: 3 additions & 1 deletion packages/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@
},
"scripts": {
"prebuild": "shx rm -rf dist && shx mkdir -p dist",
"build": "tsup --config ./config/tsup.config.ts",
"build": "npm-run-all --serial prebuild compile postbuild",
"postbuild": "shx cp -r package.json README.md src/bin dist/",
"compile": "tsup --config ./config/tsup.config.ts",
"start": "tsup src/index.ts --watch",
"types": "tsc",
"lint": "eslint ./",
Expand All @@ -51,6 +52,7 @@
"@typescript-eslint/eslint-plugin": "6.18.0",
"@typescript-eslint/parser": "6.18.0",
"jest": "29.7.0",
"npm-run-all": "^4.1.5",
"shx": "0.3.4",
"tsup": "7.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/design-tokens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"prebuild": "yarn clean",
"build:js": "vite build",
"build:scss": "shx mkdir -p scss && shx cp -r src/scss/generated/* src/scss/@tokens.scss scss/",
"build": "npm-run-all -s build:scss build:js",
"build": "npm-run-all --serial prebuild build:scss build:js",
"clean": "rimraf esm cjs umd scss types",
"lint": "stylelint --config ../../.stylelintrc.js ./src/**/*.scss",
"test": "yarn lint",
Expand Down
3 changes: 2 additions & 1 deletion packages/form-validations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"examples:build": "vite build --config ./config/vite/app.ts",
"examples:preview": "vite preview --config ./config/vite/app.ts",
"prebuild": "shx rm -rf dist",
"build": "npm-run-all --serial build:*",
"build": "npm-run-all --serial 'prebuild build:* postbuild'",
"postbuild": "shx cp package.json README.md dist/",
"build:bundle": "vite build --config ./config/vite/lib.ts",
"build:compile": "tsc --module es2015 --outDir dist --project ./config/tsconfig.prod.json",
Expand All @@ -42,6 +42,7 @@
"@swc/jest": "0.2.29",
"@types/jest": "29.5.11",
"jest-environment-jsdom": "29.7.0",
"npm-run-all": "4.1.5",
"sass": "1.69.7",
"shx": "0.3.4",
"tslib": "2.6.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"build:prepare": "shx mkdir -p dist/svg dist/react dist/.tmp-svg",
"build:copy": "shx cp -r package.json README.md dist/",
"build:react": "svg2react-icon --typescript --no-sub-dir ./dist/.tmp-svg ./dist/react",
"build:react:clean": "shx rm -rf dist/react/**.d.ts dist/react/**.js.map dist/.tmp-svg",
"build:react:clean": "shx rm -rf 'dist/react/**.d.ts dist/react/**.js.map dist/.tmp-svg'",
"build:const": "node ./scripts/buildConstants.js",
"prebuild": "npm-run-all build:clean build:prepare",
"build": "npm-run-all build:svg prepare:react build:react build:const",
"build": "npm-run-all --serial prebuild build:svg prepare:react build:react build:const postbuild",
"postbuild": "npm-run-all build:react:clean build:copy"
},
"devDependencies": {
Expand Down
5 changes: 4 additions & 1 deletion packages/web-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"jest": "29.7.0",
"jest-cli": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"npm-run-all": "4.1.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"recast": "0.23.4",
Expand All @@ -76,6 +77,8 @@
"typescript": "5.3.3",
"vite": "4.5.1",
"vite-plugin-handlebars": "1.6.0",
"webpack": "5.89.0",
"webpack-cli": "5.1.4",
"webpack-merge": "5.10.0"
},
"peerDependencies": {
Expand All @@ -90,7 +93,7 @@
"examples:build": "vite build --config ./config/vite/app.ts",
"examples:preview": "vite preview --config ./config/vite/app.ts",
"prebuild": "shx rm -rf dist && shx mkdir -p dist && shx cp package.json README.md dist/ ",
"build": "npm-run-all --serial build:umd build:es2020 build:esNext",
"build": "npm-run-all --serial prebuild build:umd build:es2020 build:esNext postbuild",
"build:cjs": "yarn rollup --bundleConfigAsCjs",
"build:umd": "npm-run-all --serial webpack:dev webpack:prod",
"build:es2020": "tsc --module es2020 --outDir dist --project ./config/tsconfig.prod.json",
Expand Down
8 changes: 4 additions & 4 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"examples:build:gh": "yarn examples:build --base=/spirit-design-system/",
"examples:preview": "vite preview",
"prebuild": "shx rm -rf dist && shx mkdir -p dist/scss && shx cp package.json README.md dist/ && shx cp -r src/scss dist/ && shx rm -rf dist/scss/**/__tests__",
"build": "npm-run-all --serial --continue-on-error design-tokens:build css js",
"build": "npm-run-all --serial --continue-on-error prebuild design-tokens:build css js",
"precss": "yarn css:lint",
"css": "yarn css:compile && yarn css:prefix && yarn css:minify",
"css": "npm-run-all --serial precss css:compile css:prefix css:minify",
"css:lint": "stylelint --config ../../.stylelintrc.js \"src/**/*.scss\" --cache --cache-location .cache/.stylelintcache",
"css:lint:fix": "stylelint --config ../../.stylelintrc.js \"src/**/*.scss\" --fix",
"css:compile:components": "sass --load-path=../design-tokens/scss src/scss/components/index.scss dist/css/components.css",
Expand All @@ -38,11 +38,11 @@
"css:prefix": "postcss --config ./config/postcss.config.js --replace \"dist/css/*.css\" \"!dist/css/*.min.css\"",
"css:minify": "cleancss --format breaksWith=lf --source-map-inline-sources --batch --batch-suffix \".min\" \"dist/css/*.css\" \"!dist/css/*.min.css\"",
"js": "npm-run-all js:compile",
"js:compile": "npm-run-all --aggregate-output --parallel js:compile:*",
"js:compile": "npm-run-all --aggregate-output --parallel 'js:compile:**'",
"js:compile:standalone": "rollup --environment BUNDLE:false --config config/rollup.config.js",
"js:compile:standalone:esm": "rollup --environment ESM:true,BUNDLE:false --config config/rollup.config.js",
"js:compile:bundle": "rollup --environment BUNDLE:true --config config/rollup.config.js",
"js:compile:plugins": "tsc --module es2015 --outDir dist/js --project ./config/tsconfig.prod.json",
"js:compile:plugins": "tsc --module es2015 --outDir dist/js --project ./config/tsconfig.prod.json && yarn postjs:compile:plugins",
"postjs:compile:plugins": "cd dist/js && shx mv index.esm.js index.js && shx mv index.esm.js.map index.js.map && shx mv index.esm.d.ts index.d.ts && rm index.umd.js index.umd.js.map index.umd.d.ts",
"js:lint": "eslint ./",
"js:lint:fix": "yarn js:lint --fix",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3468,6 +3468,7 @@ __metadata:
"@typescript-eslint/parser": 6.18.0
filedirname: ^3.0.0
jest: 29.7.0
npm-run-all: ^4.1.5
react-scanner: ^1.1.0
sade: ^1.8.1
shx: 0.3.4
Expand Down Expand Up @@ -3572,6 +3573,7 @@ __metadata:
"@swc/jest": 0.2.29
"@types/jest": 29.5.11
jest-environment-jsdom: 29.7.0
npm-run-all: 4.1.5
sass: 1.69.7
shx: 0.3.4
tslib: 2.6.2
Expand Down Expand Up @@ -3645,6 +3647,7 @@ __metadata:
jest: 29.7.0
jest-cli: 29.7.0
jest-environment-jsdom: 29.7.0
npm-run-all: 4.1.5
react: 18.2.0
react-dom: 18.2.0
react-transition-group: ^4.4.5
Expand All @@ -3659,6 +3662,8 @@ __metadata:
typescript: 5.3.3
vite: 4.5.1
vite-plugin-handlebars: 1.6.0
webpack: 5.89.0
webpack-cli: 5.1.4
webpack-merge: 5.10.0
peerDependencies:
"@lmc-eu/spirit-design-tokens": "*"
Expand Down

0 comments on commit fea26e9

Please sign in to comment.