forked from forwardemail/forwardemail.net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package-scripts.js
54 lines (45 loc) · 1.56 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
/**
* Copyright (c) Forward Email LLC
* SPDX-License-Identifier: BUSL-1.1
*/
const { series, concurrent } = require('nps-utils');
module.exports = {
scripts: {
all: series.nps('build', 'apps-and-watch'),
appsAndWatch: concurrent.nps('apps', 'watch'),
apps: series.nps('bree', 'api', 'web', 'smtp', 'imap', 'pop3', 'sqlite'),
webAndWatch: series.nps('build', 'web', 'watch'),
bree: 'nodemon bree.js',
api: 'nodemon api.js',
web: 'nodemon web.js',
smtp: 'SMTP_ALLOW_INSECURE_AUTH=true SMTP_PORT=2432 nodemon smtp.js',
imap: 'IMAP_PORT=2113 nodemon imap.js',
pop3: 'POP3_PORT=2115 nodemon pop3.js',
sqlite: 'nodemon sqlite.js',
watch: 'gulp watch',
clean: 'gulp clean',
build: 'gulp build',
buildTest: 'NODE_ENV=test gulp build',
//
// TODO: once remark-preset-github is upgraded to ESM and all deps upgraded
// then we can change `-qo` to `-qfo` to get failure on warnings
// <https://github.com/remarkjs/remark-lint/blob/main/packages/remark-preset-lint-recommended/index.js>
//
lintMd: 'remark . -qo',
lintPkg: 'fixpack',
lintPug: 'prettier --write **/*.pug && pug-lint **/*.pug',
lintJs: 'xo --fix',
lintScss: 'stylelint --fix **/*.scss',
lint: concurrent.nps(
'lint-js',
'lint-md',
'lint-pug',
'lint-pkg',
'lint-scss'
),
// <https://github.com/kentcdodds/nps-utils/issues/24>
pretest: concurrent.nps('lint', 'build-test'),
test: 'nyc ava',
testUpdateSnapshots: series('nps pretest', 'ava --update-snapshots')
}
};