Skip to content

Commit f3adb13

Browse files
committed
chore(package): rename scripts to more idiomatic names
1 parent 9fc4681 commit f3adb13

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

.github/workflows/nodejs.yml

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
run: npm ci
2828
- name: Lint commit message
2929
run: git log -1 --pretty=format:"%s" | npx commitlint
30+
- name: Lint code
31+
run: npm run lint
3032
- name: Run all tests
3133
run: npm test
3234
env:

docs/development/scripts.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ Any of the scripts below can be run by typing `npm run <script name>` in the pro
55
### Developing
66
Script name | Description
77
--- | ---
8-
`test:lint` | Report ESLint style errors and warnings.
8+
`lint` | Report ESLint style errors and warnings.
9+
`lint:fix` | Automatically fix linting problems.
910

1011
### Building
1112
Script name | Description
1213
--- | ---
1314
`build` | Build a new set of JS assets, and output them to `/dist` and `/browser`.
1415
`build:bundle` | Build `/browser/index.js` only.
1516
`build:umd` | Build `/dist/index.js` only.
16-
`build:bundlesize` | Check if the bundle size is within allowed size range
17+
`build:bundlesize` | Check if the bundle size is within allowed size range.
1718

1819
### Testing
1920
Script name | Description
2021
--- | ---
2122
`test` | Run unit tests in Node and run ESLint in errors-only mode.
22-
`test:lint` | Report ESLint style errors and warnings.
2323
`test:unit` | Run unit tests in Node.
2424
`test:unit:watch` | Run tests with change watching.

package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@
3333
"build:umd": "webpack --config webpack/core.babel.js",
3434
"build:bundle": "webpack --config webpack/bundle.babel.js",
3535
"build:bundlesize": "bundlesize --config ./bundlesize.config.json",
36+
"lint": "eslint src/ test/",
37+
"lint:fix": "npm run lint -- --fix",
38+
"test": "npm run test:unit",
39+
"test:unit": "run-s test:unit:setup test:unit:run test:unit:teardown",
40+
"test:unit:setup": "webpack --config webpack/test_webpack_build.babel.js",
41+
"test:unit:run": "jest --runInBand",
42+
"test:unit:teardown": "rm -rf ./test-webpack/.tmp",
43+
"test:unit:watch": "jest --watch",
3644
"deps": "run-s deps:license deps:size",
3745
"deps:license": "license-checker --production --csv --out $npm_package_config_deps_check_dir/licenses.csv && license-checker --development --csv --out $npm_package_config_deps_check_dir/licenses-dev.csv",
3846
"deps:size": "webpack --config webpack/test_size.babel.js --json | webpack-bundle-size-analyzer >| $npm_package_config_deps_check_dir/sizes.txt",
3947
"security-audit": "run-s -sc security-audit:all security-audit:prod",
4048
"security-audit:prod": "npm-audit-ci-wrapper -p -t low",
41-
"security-audit:all": "npm-audit-ci-wrapper -t moderate",
42-
"test": "run-s test:unit test:lint",
43-
"test:lint": "eslint src/ test/",
44-
"test:lint:fix": "eslint src/ test/ --fix",
45-
"test:unit": "run-s test:unit:setup test:unit:run test:unit:teardown",
46-
"test:unit:setup": "webpack --config webpack/test_webpack_build.babel.js",
47-
"test:unit:run": "jest --runInBand",
48-
"test:unit:teardown": "rm -rf ./test-webpack/.tmp",
49-
"test:unit:watch": "jest --watch"
49+
"security-audit:all": "npm-audit-ci-wrapper -t moderate"
5050
},
5151
"keywords": [
5252
"oai",

0 commit comments

Comments
 (0)