-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage-scripts.js
31 lines (30 loc) · 1.12 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
const { crossEnv, series, rimraf } = require("nps-utils");
module.exports = {
scripts: {
default: "nps",
clean: rimraf("dist"),
build: {
config: "au build-config",
manifest: "au build-manifest",
},
test: {
default: crossEnv("BABEL_TARGET=node jest"),
coverage: crossEnv("BABEL_TARGET=node jest --coverage"),
watch: crossEnv("BABEL_TARGET=node jest --watch"),
},
update: {
defaultnames: "au update-external --kind default-names",
translations: series(
'i18next-scanner "app/**/*.{js,html}" > /dev/null 2>&1',
"au update-external --kind translations",
"prettier app/locale/**/*.js --write",
),
},
webpack: {
analyse: "webpack --env.environment=production --analyze",
devserver: "webpack-dev-server --env.environment=dev --extractCss",
build: "webpack --extractCss",
},
lint: series("au lint", 'stylelint "app/**/*.scss"', 'eslint "app/**/*.js" "test/**/*.js"'),
},
};