-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gulpfile.js
47 lines (38 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
var gulp = require('gulp'),
gp_concat = require('gulp-concat'),
gp_rename = require('gulp-rename'),
gp_uglify = require('gulp-uglify'),
gp_sourcemaps = require('gulp-sourcemaps');
gulp.task('browserify', function () {
var files = [
'./node_modules/angular/angular.js',
'./node_modules/angular-animate/angular-animate.js',
'./node_modules/angular-aria/angular-aria.js',
'./node_modules/angular-material/angular-material.js',
'./front/src/**/**.js'
];
return gulp.src(files)
.pipe(gp_sourcemaps.init())
.pipe(gp_concat('concat.js'))
.pipe(gulp.dest('./front/public'))
.pipe(gp_rename('uglify.js'))
.pipe(gp_uglify())
.pipe(gp_sourcemaps.write('./'))
.pipe(gulp.dest('./front/public'));
});
gulp.task('css', function () {
var files = [
'./node_modules/angular-material/angular-material.css',
'./front/src/style/**.css'
];
return gulp.src(files)
.pipe(gp_concat('style.css'))
.pipe(gulp.dest('./front/public'));
});
gulp.task('watch', function () {
gulp.watch('./front/src/**/**.js', ['browserify']);
gulp.watch('./front/src/style/**.css', ['css']);
});
gulp.task('default', ['browserify', 'css', 'watch'], function () {
// place code for your default task here
});