This repository was archived by the owner on Oct 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage-scripts.js
More file actions
72 lines (69 loc) · 2.22 KB
/
Copy pathpackage-scripts.js
File metadata and controls
72 lines (69 loc) · 2.22 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/* eslint-disable import/no-extraneous-dependencies */
/* eslint-disable import/no-commonjs */
const npsUtils = require('nps-utils');
const { series, concurrent, rimraf } = npsUtils;
module.exports = {
scripts: {
commit: {
description: 'This uses commitizen to help us generate well formatted commit messages',
script: 'git-cz'
},
test: {
default: 'jest --coverage',
watch: 'DEBUG=iris:* jest --watch',
integration: 'DEBUG=iris:* jest --coverage --config ./jest.integration.json --watch',
integrationCi: 'DEBUG=iris:* jest --coverage --config ./jest.integration.json'
},
build: {
description: 'delete the dist directory and run babel to build the files',
script: series(
rimraf('dist'),
'babel --copy-files --out-dir dist --ignore *.test.js,__mocks__ src'
)
},
lint: {
description: 'lint the entire project',
script: 'eslint src/**/*.js'
},
reportCoverage: {
description: 'Report coverage stats to codecov. Happens after testing',
script: 'codecov'
},
release: {
description: 'We automate releases with semantic-release. This should only be run on travis',
script: 'semantic-release'
},
areWeFlow: {
description: 'Checks how many files ARE NOT flow-inized',
script: 'are-we-flow-yet src'
},
validate: {
description:
'This runs several scripts to make sure things look good before committing or on clean install',
script: concurrent.nps('lint', 'areWeFlow', 'flow', 'test')
},
format: {
description: 'Formats everything with prettier-eslint',
script: 'prettier-eslint "src/**/*.js" --write'
},
docs: {
description: 'Generate documentation',
script: 'documentationjs'
},
todo: {
description: 'Generate TODO.md from in source TODO and FIXME tags',
script: 'leasot --reporter markdown src/**/**/*.js >> TODOS.md'
},
flow: {
description: 'Run Flow',
script: 'flow check'
},
integration: {
description: 'Validate and report coverage',
script: series('DEBUG=iris:* jest --coverage --config ./jest.integration.json', 'codecov')
}
},
options: {
silent: false
}
};