forked from forwardemail/forwardemail.net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package-scripts.js
36 lines (29 loc) · 1.17 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
const { series, concurrent } = require('nps-utils');
module.exports = {
scripts: {
all: series.nps('build', 'apps-and-watch'),
appsAndWatch: concurrent.nps('apps', 'watch'),
apps: concurrent.nps('bree', 'api', 'web'),
bree: 'nodemon bree.js',
api: 'nodemon api.js',
web: 'nodemon web.js',
watch: 'gulp watch',
clean: 'gulp clean',
build: 'gulp build',
publishAssets: 'gulp publish',
lintJs: 'gulp xo',
lintMd: 'gulp remark',
lintPug: 'gulp pug',
lint: concurrent.nps('lint-js', 'lint-md', 'lint-pug'),
// <https://github.com/kentcdodds/nps-utils/issues/24>
pretest: concurrent.nps('lint', 'build', 'pretest-mongo', 'pretest-redis'),
pretestMongo: "mongo forwardemail_test --eval 'db.dropDatabase()'",
// <https://stackoverflow.com/a/16974060/3586413>
pretestRedis:
"redis-cli EVAL \"return redis.call('del', 'defaultKey', unpack(redis.call('keys', ARGV[1])))\" 0 limit_test:*",
test: 'ava',
testCoverage: series('nps pretest', 'nyc ava'),
testUpdateSnapshots: series('nps pretest', 'ava --update-snapshots'),
coverage: 'nyc report --reporter=text-lcov > coverage.lcov && codecov'
}
};