-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage-scripts.js
38 lines (35 loc) · 1009 Bytes
/
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
const npsUtils = require('nps-utils')
const { rimraf, series } = npsUtils
const version = require('./package.json').version
module.exports = {
scripts: {
clean: series(rimraf('coverage'), rimraf('package'), rimraf('*.tgz')),
commit: 'git cz',
contributors: {
add: 'all-contributors add',
generate: 'all-contributors generate'
},
default: 'nps',
lint: {
default: 'eslint src __tests__',
fix: series.nps('lint --fix')
},
package: {
default: series.nps('package.pack', 'package.open'),
open: `open microauth-vkontakte-${version}.tgz`,
pack: 'npm pack'
},
release: 'semantic-release',
reportCoverage: 'codecov',
test: {
default: 'jest --runInBand',
coverage: series.nps('test --coverage --silent'),
watch: series.nps('test --watch')
},
validate: {
default: series.nps('lint.fix'),
dependencies: 'snyk test',
withCoverage: series.nps('validate', 'test.coverage')
}
}
}