Skip to content

Commit 5d98224

Browse files
Consolidate similar scripts with npm-run-all
1 parent 9b7f7cd commit 5d98224

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.github/workflows/tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ jobs:
3333

3434
- run: npm install
3535
- run: npm run lint
36-
- run: npm run lint-demo
3736
- run: npm run build
38-
- run: npm run build-demo
39-
- run: npm run build-types
4037
- run: npm run test
4138

4239
- name: Upload test coverage report to Codecov

package.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,19 @@
1818
"node": ">=10"
1919
},
2020
"scripts": {
21-
"build": "npm run clean && babel src -d lib --extensions '.js,.ts' --ignore '**/*.spec.js','**/*.spec.ts' && npm run build-types",
22-
"build-demo": "wp --config demo/webpack.config.js",
23-
"build-types": "tsc -p ./tsconfig.types.json",
21+
"build": "run-s clean build:*",
22+
"build:src": "babel src -d lib --extensions '.js,.ts' --ignore '**/*.spec.js','**/*.spec.ts'",
23+
"build:demo": "wp --config demo/webpack.config.js",
24+
"build:types": "tsc -p ./tsconfig.types.json",
2425
"clean": "rimraf lib/*",
2526
"format": "prettier --write 'src/**'",
26-
"lint": "tsc -p ./tsconfig.json && eslint ./src --report-unused-disable-directives --ext .js,.ts --parser-options=project:./tsconfig.json",
27-
"lint-demo": "tsc -p ./demo/tsconfig.json && eslint ./demo --report-unused-disable-directives --ext .js,.ts --parser-options=project:./demo/tsconfig.json",
27+
"lint": "run-s lint:*",
28+
"lint:src": "tsc -p ./tsconfig.json && eslint ./src --report-unused-disable-directives --ext .js,.ts --parser-options=project:./tsconfig.json",
29+
"lint:demo": "tsc -p ./demo/tsconfig.json && eslint ./demo --report-unused-disable-directives --ext .js,.ts --parser-options=project:./demo/tsconfig.json",
2830
"precommit": "pretty-quick --staged",
2931
"prepublish": "npx publish-please guard",
3032
"publish-please": "npx publish-please",
31-
"publish-please-prereqs": "npm run lint && npm run test && npm run build",
33+
"publish-please-prereqs": "run-s lint test build",
3234
"test": "jest --coverage"
3335
},
3436
"jest": {
@@ -60,6 +62,7 @@
6062
"husky": "^0.14.3",
6163
"jest": "^26.0.0",
6264
"jest-when": "^2.7.0",
65+
"npm-run-all": "^4.1.5",
6366
"prettier": "^1.13.7",
6467
"pretty-quick": "^1.6.0",
6568
"regenerator-runtime": "^0.13.3",

0 commit comments

Comments
 (0)