-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulp.config.js
96 lines (90 loc) · 2.15 KB
/
gulp.config.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
module.exports = function() {
var app = './app/';
var report = './report/';
var root = './';
var bower = {
json: require('./bower.json'),
directory: './bower_components',
}
var wiredep = require('wiredep', {
bowerJson: bower.json,
directory: bower.directory,
ignorePath: bower.ignorePath
});
var libFiles = wiredep();
libFiles.js.push(app + '/blocks/jimp.min.js');
var angularMocks = bower.directory + '/angular-mocks/angular-mocks.js';
var alljs = [
app + '**/*.module.js',
app + '**/*.js'
];
var config = {
/**
* File paths
*/
// all javascript that we want to vet
alljs: alljs,
build: './build/',
css: 'styles/**/*.css',
html: app + '**/*.html',
images: 'images/**/*.*',
index: 'index.html',
appdir : 'app/',
dist : 'dist',
// app js, with no specs
js: [
app + '*.module.js',
app + '**/*.module.js',
app + '**/*.js', '!' + app + '**/*.spec.js'
],
buildjsOrder: [
'./build/app/*/*.module.js',
'./build/app/**/*.js',
'./build/app/app.module.js',
],
sass: 'styles/**/*.scss',
report: report,
root: root,
libFiles : libFiles,
lib : '/lib',
/**
* optimized files
*/
optimized: {
app: 'app.js',
lib: 'lib.js'
},
bower: bower
};
config.getKarmaConfig = function (singleRun) {
var karmaFiles = libFiles['js'];
karmaFiles.push(angularMocks);
karmaFiles = karmaFiles.concat(alljs);
var options = {
basePath : '',
files : karmaFiles,
frameworks : ['jasmine'],
browsers : ['Chrome', 'Firefox'],
plugins: [
'karma-spec-reporter',
'karma-jasmine',
'karma-chrome-launcher',
'karma-coverage',
'karma-firefox-launcher',
'karma-phantomjs-launcher'
],
autoWatch: true,
singleRun : singleRun
};
return options;
};
config.getWiredepDefaultOptions = function() {
var options = {
bowerJson: config.bower.json,
directory: config.bower.directory,
ignorePath: config.bower.ignorePath
};
return options;
};
return config;
}