forked from starqle/starqle-ng-util
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
48 lines (40 loc) · 1.45 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
require('events').EventEmitter.prototype._maxListeners = 99;
var gulp = require('gulp'),
gulpCoffee = require('gulp-coffee'),
gulpConcat = require('gulp-concat'),
gulpIf = require('gulp-if'),
gulpUtil = require('gulp-util'),
rimraf = require('rimraf');
var errorHandler = function(error) {
gulpUtil.log(error);
}
// ----------------------------------------------------------------------------
// Production tasks
// ----------------------------------------------------------------------------
gulp.task('build-clean', function(callback) {
rimraf('dist', callback);
});
gulp.task('build-coffee', ['build-clean'], function() {
source = [
'src/intro.js',
'src/config/**/*.coffee',
'src/modules/**/*.coffee',
'src/directives/**/*.coffee',
'src/factories/**/*.coffee',
'src/filters/**/*.coffee',
'src/prototypes/**/*.coffee',
'src/services/**/*.coffee',
'src/main.coffee',
'src/outro.js'
]
return gulp.src(source)
.pipe(gulpIf('*.coffee', gulpCoffee({bare: true, map: true, compile: true})))
.pipe(gulpConcat("starqle-ng-util.js"))
// .pipe(gulp.dest('dist/'));
.pipe(gulp.dest('../eproc-webapp/.tmp/bower_components/starqle-ng-util/dist/'));
});
gulp.task('build', ['build-coffee']);
// ----------------------------------------------------------------------------
// Default task
// ----------------------------------------------------------------------------
gulp.task('default', ['build']);