-
Notifications
You must be signed in to change notification settings - Fork 0
/
package-scripts.js
57 lines (55 loc) · 1.47 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
50
51
52
53
54
55
56
57
/* eslint-disable import/no-extraneous-dependencies */
/* eslint-disable prefer-destructuring */
const npsUtils = require('nps-utils');
const concurrent = npsUtils.concurrent;
const rimraf = npsUtils.rimraf;
const series = npsUtils.series;
module.exports = {
scripts: {
commit: {
description: 'Commit changes using commitizen',
script: 'git-cz',
},
contributors: {
add: {
description: 'When new people contribute to the project, run this',
script: 'all-contributors add',
},
generate: {
description: 'Update the badge and contributors table',
script: 'all-contributors generate',
},
},
build: {
default: {
description: 'Delete the dist directory and run rollup to build the files',
script: series(rimraf('dist'), 'rollup -c'),
},
watch: {
description: 'Watch and rebuild dist',
script: 'rollup -c -w',
},
},
lint: {
description: 'lint the entire project with eslint',
script: 'eslint .',
},
test: {
default: {
description: 'Collect code coverage',
script: 'jest --coverage',
},
watch: {
description: 'Run test in interactive watch mode',
script: 'jest --watch',
},
},
validate: {
description: 'Run validation to make sure everything is up to standard',
script: concurrent.nps('lint', 'build', 'test'),
},
},
options: {
logLevel: 'warn',
},
};