-
Notifications
You must be signed in to change notification settings - Fork 694
/
package-scripts.js
49 lines (43 loc) · 1.34 KB
/
package-scripts.js
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
44
45
46
47
48
49
/**
* We generally use `nps` for scripts that we:
* 1. define at the root of the monorepo
* 2. that are meant to execute _within_ a workspace
*
* ... or ...
*
* - That could use a little JS magic that we don't want to write a full
* node script for 😂
*
* For more cases, if you have an actual root task, define it in root
* `package.json:scripts`.
*/
module.exports = {
scripts: {
// Build
// - Typescript
'types:check': 'tsc --noEmit',
// - tsup
'tsup:watch': 'tsup --watch',
tsup: 'tsup',
// - Webpack
webpack: 'webpack',
// Test
jest: 'jest',
// Quality.
// - Format
'prettier:base': 'prettier --list-different',
'prettier:base:fix': 'prettier --write',
'prettier:pkg':
'nps prettier:base -- -- --config ../../.prettierrc --ignore-path ../../.prettierignore',
'prettier:pkg:fix':
'nps prettier:base:fix -- -- --config ../../.prettierrc --ignore-path ../../.prettierignore',
'prettier:website':
'nps prettier:base -- -- --config ../.prettierrc --ignore-path ../.prettierignore',
'prettier:website:fix':
'nps prettier:base:fix -- -- --config ../.prettierrc --ignore-path ../.prettierignore',
// - Lint
'lint:base': 'eslint --cache --color',
'lint:pkg': 'nps lint:base -- -- src',
'lint:pkg:fix': 'nps lint:base -- -- --fix src'
}
};