-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathgulp.config.js
More file actions
110 lines (104 loc) · 2.71 KB
/
gulp.config.js
File metadata and controls
110 lines (104 loc) · 2.71 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
module.exports = function() {
var src = './src/';
var app = src + 'app/';
var temp = './src/.tmp/';
var dest = './src/';
var build = './www/';
var bower = {
json: require('./bower.json'),
directory: './src/lib/',
ignorePath: '../..',
exclude: [
'src/lib/angular/angular.js',
'src/lib/angular-animate/*.js',
'src/lib/angular-sanitize/*.js',
'src/lib/angular-ui-router/release/*.js'
]
};
var wiredep = require('wiredep');
var bowerFiles = wiredep({devDependencies: true})['js'];
var config = {
/**
* File paths
*/
// all javascript that we want to vet
alljs: [
'./src/app/**/*.js',
'./*.js'
],
bower: bower,
build: build,
css: temp + 'ionic.app.css',
dest: dest,
fonts: bower.directory + 'ionic/fonts/**/*.*',
htmltemplates: app + '**/*.html',
images: src + 'images/**/*.*',
index: src + 'index.html',
// app js, with no specs
js: [
src + '**/*.module.js',
src + '**/*.js',
'!' + src + '**/*.spec.js',
'!' + bower.directory + '**/*.js'
],
jsOrder: [
'**/app.module.js',
'**/*.module.js',
'**/*.js'
],
/**
* optimized files
*/
optimized: {
app: 'app.js',
lib: 'lib.js'
},
sass: src + 'styles/ionic.app.scss',
src: src,
temp: temp,
/**
* template cache
*/
templateCache: {
file: 'templates.js',
options: {
module: 'app.core',
root: 'app/',
standalone: false
}
},
specHelpers: [src + 'test-helpers/*.js']
};
/**
* wiredep and bower settings
*/
config.getWiredepDefaultOptions = function() {
var options = {
bowerJson: config.bower.json,
directory: config.bower.directory,
ignorePath: config.bower.ignorePath,
exclude: config.bower.exclude
};
return options;
};
/**
* karma settings
*/
config.karma = getKarmaOptions();
return config;
////////////////
function getKarmaOptions() {
var options = {
files: [].concat(
bowerFiles,
config.specHelpers,
app + '**/*.module.js',
app + '**/*.js',
temp + config.templateCache.file
),
exclude: [],
preprocessors: {}
};
return options;
}
};