-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
55 lines (46 loc) · 1.33 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
var gulp = require('gulp'),
gutil = require('gulp-util'),
concat = require('gulp-concat'),
coffee = require('gulp-coffee'),
connect = require('gulp-connect'),
nodemon = require('gulp-nodemon'),
order = require("gulp-order"),
uglify = require('gulp-uglify'),
rename= require('gulp-rename');
gulp.task('firebase-server', function () {
nodemon({
script: 'demo/firebase-server.js'
, env: { 'NODE_ENV': 'development' }
})
});
gulp.task('coffee', function(done) {
return gulp.src('src/**/*.coffee')
.pipe(coffee({bare: true}).on('error', gutil.log))
.pipe(concat('angularfire-resource.js'))
.pipe(gulp.dest('dist'))
.pipe(gulp.dest('demo'))
.pipe(uglify())
.pipe(rename('angularfire-resource.min.js'))
.pipe(gulp.dest('dist/'))
.pipe(gulp.dest('demo/'))
.pipe(connect.reload());
//.pipe(gulp.dest('tmp'));
//.pipe()
});
gulp.task('html', function(){
gulp.src('demo/*.html')
.pipe(connect.reload())
});
gulp.task('watch', function () {
gulp.watch(['demo/*'], ['html']);
gulp.watch('src/**/*.coffee', ['coffee']);
});
gulp.task('connect', function() {
connect.server({
root: 'demo',
livereload: true
});
});
// Default Task
//gulp.task('default', ['firebase-server', 'connect', 'coffee', 'watch']);
gulp.task('default', ['connect', 'coffee', 'watch']);