-
Notifications
You must be signed in to change notification settings - Fork 92
/
package-scripts.js
35 lines (34 loc) · 1009 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
const npsUtils = require('nps-utils');
const path = require('path');
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.css', 'build.cssmin'),
concurrent.nps('build.rollup', 'build.babel')
),
rollup: 'rollup --config',
babel: 'babel src -d lib',
css: 'lessc less/default.less dist/react-select-plus.css',
cssmin: 'lessc --clean-css less/default.less dist/react-select-plus.min.css',
standalone: series(
'cp examples/src/standalone.html examples/dist/standalone.html',
'lessc examples/src/example.less examples/dist/example.css'
),
},
publish: {
default: series(
rimraf('examples/dist'),
'webpack --progress -p',
'cp examples/src/.gitignore examples/dist/.gitignore',
'gh-pages -d examples/dist'
),
},
},
};