-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
38 lines (32 loc) · 852 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
36
37
38
var gulp = require('gulp'),
gulpif = require('gulp-if'),
babel = require("gulp-babel"),
useref = require('gulp-useref');
//wiredep = require('wiredep').stream;
// Build all
gulp.task('html', ['babel'], function () {
var assets = useref.assets();
return gulp.src('app/*.html')
.pipe(assets)
.pipe(gulpif('app.js', babel()))
.pipe(assets.restore())
.pipe(useref())
.pipe(gulp.dest('dist'));
});
gulp.task("babel", function () {
return gulp.src("app/js/app.js")
.pipe(babel())
.pipe(gulp.dest("app/js/render"));
});
// bower
// gulp.task('bower', function () {
// gulp.src('./app/index.html')
// .pipe(wiredep({
// directory : "app/bower_components"
// }))
// .pipe(gulp.dest('./app'));
// });
// gulp.task('watch', function () {
// gulp.watch('bower.json', ['bower']);
// })
gulp.task('default', ['babel', 'html']);