-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
52 lines (45 loc) · 1.32 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/// <reference path="App/login/login.controller.js" />
{
'use strict'
let gulp = require('gulp');
let webpack = require('webpack');
let minify = require('gulp-minify');
let concat = require('gulp-concat');
var babel = require('gulp-babel');
let webpackConfig = require('./webpack.config.js');
let labJs = [
"App/lib/jquery.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js",
"node_modules/angular/angular.js",
"node_modules/angular-ui-router/release/angular-ui-router.js"
];
let pageJs = [
'App/app.js',
'App/**/*.js'
];
let wathcJs = [];
gulp.task('webpack', function () {
let myconfig = Object.create(webpackConfig);
webpack(myconfig, function () {
});
})
gulp.task('labJs', function () {
gulp.src(labJs)
.pipe(babel({ presets: ['es2015'] }))
.pipe(concat('all_labs.js'))
.pipe(minify())
.pipe(gulp.dest('build'))
});
gulp.task('pageJs', function () {
gulp.src(pageJs)
.pipe(babel({ presets: ['es2015'] }))
.pipe(concat('all_pages.js'))
.pipe(minify())
.pipe(gulp.dest('build'))
})
gulp.task('default', function () {
gulp.watch(pageJs, function () {
gulp.run('pageJs');
});
})
}