-
Notifications
You must be signed in to change notification settings - Fork 4
/
gulpfile.js
35 lines (28 loc) · 880 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
35
var babel = require('gulp-babel');
var ghPages = require('gulp-gh-pages');
var gulp = require('gulp');
var webpack = require('gulp-webpack');
var webpackConfig = require('./example/webpack.config');
gulp.task('build-node-css', function() {
return gulp.src('src/**/*.css')
.pipe(gulp.dest('lib/'));
});
gulp.task('build-node-js', function() {
return gulp.src('src/**/*.js')
.pipe(babel({
experimental: true
}))
.pipe(gulp.dest('lib/'));
});
gulp.task('build-node', ['build-node-js', 'build-node-css']);
gulp.task('build-examples', function() {
return gulp.src('example/')
.pipe(webpack(webpackConfig))
.pipe(gulp.dest('example/'));
});
gulp.task('build', ['build-node', 'build-examples']);
gulp.task('deploy', ['build-examples'], function() {
return gulp.src('./example/**/*')
.pipe(ghPages());
});
gulp.task('default', ['build']);