-
-
Notifications
You must be signed in to change notification settings - Fork 634
/
Copy pathpackage-scripts.yml
43 lines (39 loc) · 1.57 KB
/
package-scripts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
scripts:
lint:
description: Run all linters (eslint, tsc)
script: nps eslint
eslint:
default:
description: Run eslint.
script: eslint
fix:
description: Run eslint and auto-fix.
script: nps "eslint --fix"
debug:
description: Run eslint in debug mode.
script: DEBUG=eslint:cli-engine nps eslint
build:
prepack:
description: Build the project in the prepack script.
# This is necessary when used as a Git dependency since we don't have the dist directory in the repo.
# Depending on the package manager, `prepack`, `prepare`, or both may be run.
# They may also be run when publishing or in other cases, so we want to cover all of them.
# 1. If the project is already built, do nothing;
# 2. Build the project but ignore TypeScript errors from missing devDependencies;
# 3. Check if the project is built now;
# 4. If it failed, print an error message (still follow https://docs.npmjs.com/cli/v8/using-npm/scripts#best-practices).
script: >
[ -f node_package/lib/ReactOnRails.full.js ] ||
(npm run build >/dev/null 2>&1 || true) &&
[ -f node_package/lib/ReactOnRails.full.js ] ||
{ echo 'Building react-on-rails seems to have failed!'; }
format:
default:
description: Format files using prettier.
script: prettier --write .
listDifferent:
description: Check that all files were formatted using prettier.
script: prettier --check .
renderer:
description: Starts the node renderer.
script: node renderer.js