-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
60 lines (54 loc) · 1.5 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
'use strict';
var gulp = require('gulp');
var gutil = require('gulp-util');
var wrench = require('wrench');
var fixmyjs = require("gulp-fixmyjs");
var options = {
src: 'src',
dist: 'dist',
tmp: '.tmp',
e2e: 'e2e',
errorHandler: function (title) {
return function (err) {
gutil.log(gutil.colors.red('[' + title + ']'), err.toString());
this.emit('end');
};
},
wiredep: {
directory: 'bower_components',
overrides: {
"angular-promise-tracker": {
"main": ["./promise-tracker.js", "./promise-tracker-http-interceptor.js"]
},
"accounting.js": {
"main": "./accounting.js"
},
"hello": {
"main": "./dist/hello.all.js"
}
},
exclude: ['bower_components/bootstrap-sass/assets/javascripts/bootstrap.js'],
fileTypes: {
html: {
replace: {
js: '<script src="/{{filePath}}"></script>'
}
}
}
}
};
wrench.readdirSyncRecursive('./gulp').filter(function (file) {
return (/\.(js|coffee)$/i).test(file);
}).map(function (file) {
require('./gulp/' + file)(options);
});
gulp.task('default', ['clean'], function () {
gulp.start('build');
});
gulp.task('fixmyjs', function () {
return gulp.src("./src/**/*.js")
.pipe(fixmyjs({
// JSHint settings here
}))
.pipe(gulp.dest("./src"));
});