-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathpackage-scripts.js
More file actions
22 lines (22 loc) · 1.3 KB
/
package-scripts.js
File metadata and controls
22 lines (22 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
let isWindows = require('is-os').isWindows();
module.exports = {
scripts: {
// Scripts shared by each package under examples & packages
dev: 'cross-env NODE_ENV=dev webpack --display "normal" --color --watch',
buildDev: 'cross-env NODE_ENV=dev webpack && yarn test-ci',
buildProd: 'cross-env NODE_ENV=prod webpack && yarn test-ci',
buildPack: 'cross-env NODE_ENV=prod yarn pack --out %s-v%v.tgz',
buildDocs: 'cross-env NODE_ENV=dev BUILD_DOCS=true webpack',
test: 'node --expose-gc node_modules/.bin/jest --color --no-cache -c ./jest.config.js --rootDir . --watchAll',
testCi: 'node --expose-gc node_modules/.bin/jest --color --no-cache -c ./jest.config.js --rootDir .',
clean: isWindows
? 'rmdir -r ./.dist && rmdir -r ./.tsbuild && del /s /q esp*.tgz'
: `rm -rf ./.dist && rm -rf ./.tsbuild && find . -name 'esp*.tgz' -delete`,
// Scrips only called from the root package.json
trash: isWindows
? 'echo \'Trash script not supported on windows\''
: './scripts/trash.sh && lerna run clean && lerna clean && rm -rf ./node_modules',
publishAll: 'yarn clean && yarn build-prod && lerna publish',
createPackage: 'yarn clean && yarn build-prod && lerna run build-pack'
}
};