forked from reactjs/react-art
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
34 lines (30 loc) · 851 Bytes
/
gulpfile.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
var gulp = require('gulp');
var gReact = require('gulp-react');
var del = require('del');
var shell = require('gulp-shell');
gulp.task('clean', function(cb) {
del(['lib/', 'Flux.js'], cb);
});
gulp.task('default', ['clean'], function() {
return gulp.src('src/*.js')
.pipe(gReact({harmony: true}))
.pipe(gulp.dest('lib'));
});
gulp.task('build-examples-website', ['clean'], shell.task([[
'pushd ../react-art-gh-pages',
'git checkout -- .',
'git clean -dfx',
'git pull',
'rm -rf *',
'popd',
'pushd examples/vector-widget',
'npm install',
'npm run build',
'popd',
'cp -r examples/vector-widget/{index.html,bundle.js} ../react-art-gh-pages',
'pushd ../react-art-gh-pages',
'git add -A .',
'git commit -m "Update website"',
'popd',
'echo "react-art-gh-pages ready to push"'
].join(';')]));