-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
34 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
const gulp = require('gulp');
// const clean = require('gulp-clean');
const babel = require('gulp-babel');
// const postcss = require('gulp-postcss');
const del = require('del');
const buildDir = './tmp';
gulp.task('build', ['dist'], function() {
return del([buildDir]);
});
gulp.task('dist', ['transpile',], function () {
return gulp.src('./'+buildDir+'/**/*.*')
.pipe(gulp.dest('./lib'));
});
gulp.task('transpile', function () {
return gulp.src(['./src/**/*.js', '!./src/**/*.spec.js'])
.pipe(babel())
.pipe(gulp.dest(buildDir));
});
// gulp.task('postcss', function () {
// var processors = config.postcss();
//
// return gulp.src('./src/components/**/*.css')
// .pipe(postcss(processors))
// .pipe(gulp.dest(buildDir));
// });
gulp.task('watch', function() {
gulp.watch(['./src/**/*.*', '!./src/components/**/*.spec.js'], ['build']);
});