Skip to content

Commit

Permalink
chore: gets rid of npm pre/post scripts (#1005)
Browse files Browse the repository at this point in the history
  • Loading branch information
stalniy authored Jan 5, 2025
1 parent 5da6437 commit 2b8381b
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 32 deletions.
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

8 changes: 4 additions & 4 deletions packages/casl-ability/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
"build.core": "dx rollup -n casl -g @ucast/mongo2js:ucast.mongo2js",
"build.extra": "dx rollup -i src/extra/index.ts -n casl.extra -g @ucast/mongo2js:ucast.mongo2js",
"build.types": "dx tsc",
"prebuild": "rm -rf dist/*",
"build": "npm run build.types && npm run build.core && npm run build.extra",
"build.prepare": "rm -rf dist/* && npm run build.types",
"build": "npm run build.prepare && npm run build.core && npm run build.extra",
"lint": "dx eslint src/ spec/",
"test": "dx jest",
"prerelease": "npm run lint && npm test && NODE_ENV=production npm run build",
"release": "dx semantic-release"
"release.prepare": "npm run lint && npm test && NODE_ENV=production npm run build",
"release": "npm run release.prepare && dx semantic-release"
},
"keywords": [
"permissions",
Expand Down
13 changes: 6 additions & 7 deletions packages/casl-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,18 @@
"access": "public"
},
"scripts": {
"prebuild": "rm -rf dist/*",
"build": "npm run build.types && npm run build.es5m && npm run build.es6 && npm run build.umd",
"build.prepare": "rm -rf dist/* && npm run build.types",
"build": "npm run build.prepare && npm run build.es5m && npm run build.es6 && npm run build.umd",
"build.es5m": "TARGET=es5 BUILD=es5m npm run rollup",
"build.es6": "TARGET=es2015 BUILD=es6m npm run rollup",
"build.umd": "TARGET=es5 BUILD=umd npm run rollup",
"build.types": "ngc -p tsconfig.types.json && rm -rf dist/types/*.js",
"prerollup": "ngc -p tsconfig.build.json --target $TARGET --outDir dist/$BUILD/tmp",
"rollup": "IGNORE_SUBPATH=1 LIB_MINIFY=false BUILD_TYPES=$BUILD ES_TRANSFORM=false dx rollup -i dist/$BUILD/tmp/index.js -n casl.ng -g @angular/core:ng.core,@casl/ability:casl,tslib:tslib,rxjs:rxjs",
"postrollup": "rm -rf dist/$BUILD/tmp",
"rollup.prepare": "ngc -p tsconfig.build.json --target $TARGET --outDir dist/$BUILD/tmp",
"rollup": "npm run rollup.prepare && IGNORE_SUBPATH=1 LIB_MINIFY=false BUILD_TYPES=$BUILD ES_TRANSFORM=false dx rollup -i dist/$BUILD/tmp/index.js -n casl.ng -g @angular/core:ng.core,@casl/ability:casl,tslib:tslib,rxjs:rxjs && rm -rf dist/$BUILD/tmp",
"test": "dx jest --config ./jest.config.js",
"lint": "dx eslint src/ spec/",
"prerelease": "npm run lint && NODE_ENV=production npm run build && npm test",
"release": "dx semantic-release"
"release.prepare": "npm run lint && NODE_ENV=production npm run build && npm test",
"release": "npm run release.prepare && dx semantic-release"
},
"keywords": [
"casl",
Expand Down
8 changes: 4 additions & 4 deletions packages/casl-aurelia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"access": "public"
},
"scripts": {
"prebuild": "rm -rf dist/* && npm run build.types",
"build": "BUILD_TYPES=es5m,es6m,umd dx rollup -n casl.au -g aurelia-framework:au,@casl/ability:casl",
"build.prepare": "rm -rf dist/* && npm run build.types",
"build": "npm run build.prepare && BUILD_TYPES=es5m,es6m,umd dx rollup -n casl.au -g aurelia-framework:au,@casl/ability:casl",
"build.types": "dx tsc",
"lint": "dx eslint src/",
"test": "dx jest --env jsdom --config ../dx/config/jest.chai.config.js",
"prerelease": "npm run lint && npm test && NODE_ENV=production npm run build",
"release": "dx semantic-release"
"release.prepare": "npm run lint && npm test && NODE_ENV=production npm run build",
"release": "npm run release.prepare && dx semantic-release"
},
"keywords": [
"casl",
Expand Down
8 changes: 4 additions & 4 deletions packages/casl-mongoose/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
},
"homepage": "https://casl.js.org",
"scripts": {
"prebuild": "rm -rf dist/* && npm run build.types",
"build": "BUILD_TYPES=es6m,es6c dx rollup -e @casl/ability/extra,@casl/ability,mongoose",
"build.prepare": "rm -rf dist/* && npm run build.types",
"build": "npm run build.prepare && BUILD_TYPES=es6m,es6c dx rollup -e @casl/ability/extra,@casl/ability,mongoose",
"build.types": "dx tsc",
"lint": "dx eslint src/ spec/",
"test": "dx jest",
"prerelease": "npm run lint && npm test && NODE_ENV=production npm run build",
"release": "dx semantic-release"
"release.prepare": "npm run lint && npm test && NODE_ENV=production npm run build",
"release": "npm run release.prepare && dx semantic-release"
},
"keywords": [
"casl",
Expand Down
8 changes: 4 additions & 4 deletions packages/casl-prisma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
},
"homepage": "https://casl.js.org",
"scripts": {
"prebuild": "rm -rf dist/* && npm run build.types && npm run build.runtime",
"build.prepare": "rm -rf dist/* && npm run build.types && npm run build.runtime",
"build.runtime": "BUILD_TYPES=es6m,es6c dx rollup -i src/runtime.ts -e @casl/ability/extra,@casl/ability,@prisma/client,@ucast/core,@ucast/js",
"build": "BUILD_TYPES=es6m,es6c dx rollup -e @casl/ability/extra,@casl/ability,@prisma/client,@ucast/core,@ucast/js,./runtime",
"build": "npm run build.prepare && BUILD_TYPES=es6m,es6c dx rollup -e @casl/ability/extra,@casl/ability,@prisma/client,@ucast/core,@ucast/js,./runtime",
"build.types": "dx tsc",
"lint": "dx eslint src/ spec/",
"test": "dx jest",
"prerelease": "npm run lint && npm test && NODE_ENV=production npm run build",
"release": "dx semantic-release",
"release.prepare": "npm run lint && npm test && NODE_ENV=production npm run build",
"release": "npm run release.prepare && dx semantic-release",
"prepare": "prisma generate"
},
"keywords": [
Expand Down
8 changes: 4 additions & 4 deletions packages/casl-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"access": "public"
},
"scripts": {
"prebuild": "rm -rf dist/* && npm run build.types",
"build": "BUILD_TYPES=es5m,es6m,umd dx rollup -n casl.react -g react:React,prop-types:React.PropTypes,@casl/ability:casl",
"build.prepare": "rm -rf dist/* && npm run build.types",
"build": "npm run build.prepare && BUILD_TYPES=es5m,es6m,umd dx rollup -n casl.react -g react:React,prop-types:React.PropTypes,@casl/ability:casl",
"build.types": "dx tsc",
"lint": "dx eslint src/ spec/",
"test": "dx jest --env jsdom --config ../dx/config/jest.chai.config.js",
"prerelease": "npm run lint && npm test && NODE_ENV=production npm run build",
"release": "dx semantic-release"
"release.prepare": "npm run lint && npm test && NODE_ENV=production npm run build",
"release": "npm run release.prepare && dx semantic-release"
},
"keywords": [
"casl",
Expand Down
8 changes: 4 additions & 4 deletions packages/casl-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
"access": "public"
},
"scripts": {
"build": "BUILD_TYPES=es5m,es6m,umd dx rollup -n casl.vue -g vue:Vue,@casl/ability:casl",
"build.prepare": "rm -rf dist/* && npm run build.types",
"build": "npm run build.prepare && BUILD_TYPES=es5m,es6m,umd dx rollup -n casl.vue -g vue:Vue,@casl/ability:casl",
"build.types": "dx tsc -p tsconfig.build.json",
"prebuild": "rm -rf dist/* && npm run build.types",
"lint": "dx eslint src/ spec/",
"test": "dx jest --env jsdom --config ../dx/config/jest.chai.config.js",
"prerelease": "npm run lint && npm test && NODE_ENV=production npm run build",
"release": "dx semantic-release"
"release.prepare": "npm run lint && npm test && NODE_ENV=production npm run build",
"release": "npm run release.prepare && dx semantic-release"
},
"keywords": [
"casl",
Expand Down

0 comments on commit 2b8381b

Please sign in to comment.