-
Notifications
You must be signed in to change notification settings - Fork 0
/
package-scripts.js
56 lines (56 loc) · 1.89 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
module.exports = {
scripts: {
commit: {
description: 'This uses commitizen to help us generate well formatted commit messages',
script: 'git-cz',
},
test: {
default: {
script: 'ava ./src/**/*.test.js',
},
watch: {
description: 'pass the -w flag on to the npm t command so ava will watch stuff',
script: 'p-s test -w',
},
},
build: {
description: 'delete the dist directory and run babel to build the files',
script: 'rimraf dist && babel --copy-files --out-dir dist --ignore *.test.js src',
},
lint: {
description: 'lint the entire project',
script: 'eslint .',
},
checkCoverage: {
description: 'We want to keep 100% code coverage on this project because, reasons',
script: 'nyc check-coverage --statements 100 --branches 100 --functions 100 --lines 100',
},
cover: {
description: 'we use nyc to instrument our code for coverage. Some of the config happens in package.json',
script: 'nyc npm t',
},
reportCoverage: {
description: 'Report coverage stats to codecov. This should be run after the `cover` script',
script: 'codecov',
},
release: {
description: 'We automate releases with semantic-release. This should only be run on travis',
script: 'semantic-release pre && npm publish && semantic-release post',
},
validate: {
description: 'This runs several scripts to make sure things look good before committing or on clean install',
script: 'p-s -p lint,build,cover && p-s check-coverage',
},
addContributor: {
description: 'When new people contribute to the project, run this',
script: 'all-contributors add',
},
generateContributors: {
description: 'Update the badge and contributors table',
script: 'all-contributors generate',
},
},
options: {
silent: false,
},
}