forked from JedWatson/react-select
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package-scripts.js
37 lines (35 loc) · 1007 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
// @flow
const npsUtils = require('nps-utils');
const series = npsUtils.series;
const rimraf = npsUtils.rimraf;
const concurrent = npsUtils.concurrent;
module.exports = {
scripts: {
build: {
description: 'clean dist directory and run all builds',
default: series(
rimraf('dist'),
rimraf('lib'),
concurrent.nps('build.rollup', 'build.babel'),
'nps build.flowtype',
rimraf('lib/__tests__')
),
rollup: 'rollup --config',
babel: 'babel src -d lib',
watch: 'babel src -d lib -w',
flowtype: {
description: 'make flow types available to consumers',
default: concurrent.nps('build.flowtype.lib'),
lib: 'echo "// @flow\n\nexport * from \'../src\';" > lib/index.js.flow',
},
docs: series(rimraf('docs/dist'), 'webpack --progress -p'),
},
publish: {
default: series(
'nps build.docs',
'gh-pages -d docs/dist',
rimraf('docs/dist')
),
},
},
};