-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
74 lines (56 loc) · 1.41 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
'use strict';
var gulp = require('gulp'),
concat = require('gulp-concat'),
concatCss = require('gulp-concat-css'),
//sprite = require('gulp-sprite-generator'),
webserver = require('gulp-webserver');
var YOUR_LOCALS = {};
gulp.task('js', function(){
gulp.src([
'bower_components/angular/angular.js',
'bower_components/firebase/firebase.js',
'bower_components/angularfire/dist/angularfire.js',
'bower_components/angular-ui-mask/dist/mask.js'
])
.pipe(concat('libs.js'))
//.pipe(uglify())
.pipe(gulp.dest('build/dev'));
gulp.src([
'build/dev/app/*.js',
'build/dev/app/**/*.js',
'!build/dev/app/**/*_test.js',
])
.pipe(concat('app.js'))
.pipe(gulp.dest('build/dev'));
});
gulp.task('css', function(){
gulp.src([
'bower_components/bootstrap/bootstrap.css'
])
.pipe(concat('theme.css'))
.pipe(gulp.dest('build/dev'));
gulp.src('build/dev/app/**/*.css')
.pipe(concat('app.css'))
//autoprefix
//minification
.pipe(gulp.dest('build/dev'));
});
gulp.task('webserver', function(){
gulp.src('build/dev/')
.pipe(webserver({
livereload : true,
open : true
}));
});
gulp.task('watch',function(){
//gulp.watch('build/dev/*.html', ['html']);
gulp.watch('build/dev/app/**/*.js', ['js']);
gulp.watch('build/dev/app/**/*.css', ['css']);
//gulp.watch('build/dev/app/**/*.*', ['app']);
});
gulp.task('default', [
'js',
'css',
'watch',
'webserver'
]);