-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulp.config.js
131 lines (118 loc) · 3.36 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
module.exports = function() {
var client = './src/client/';
var server = './src/server/';
var clientApp = client + 'app/';
var root = './';
var specRunnerFile = 'specs.html';
var scenariosPo = client + '/**/*.po.js'; // Page Objects.
var scenarios = client + '/**/*.spec.e2e.js';
var temp = './.tmp/';
var wiredep = require('wiredep');
var bowerFiles = wiredep({devDependencies: true})['js'];
var config = {
/**
* File paths
*/
root: root,
client: client,
server: server,
source: 'src/',
htmltemplates: clientApp + '/**/*.html',
css: temp + '/styles.css',
cssToProcess: client + '/styles/styles.*',
html: client + '/**/*.html',
index: client + '/index.html',
// app js, with no specs
js: [
clientApp + '/**/*.module.js',
clientApp + '/**/*.js',
'!' + clientApp + '/**/*.spec.js'
],
// all javascript that we want to vet
alljs: [
'./src/**/*.js',
'./*.js'
],
plato: {js: clientApp + '/**/*.js'},
fonts: './bower_components/font-awesome/fonts/**/*.*',
images: client + '/images/**/*.*',
build: './build/',
temp: temp,
report: './report/',
/**
* browser sync
*/
browserReloadDelay: 1000,
/**
* Template Cache settings
*/
templateCache: {
module: 'app.core',
file: 'templates.js',
root: 'app/',
standAlone: false,
path: temp
},
/**
* Bower and NPM locations
*/
bower: {
directory: './bower_components/',
ignorePath: '../..'
},
packages: [
'./package.json',
'./bower.json'
],
/**
* specs.html, our HTML spec runner
*/
specRunner: client + specRunnerFile,
specRunnerFile: specRunnerFile,
/**
* The sequence of the injections into specs.html:
* 1 testlibraries
* mocha setup
* 2 bower
* 3 js
* 4 spechelpers
* 5 specs
* 6 templates
*/
testlibraries: [
'node_modules/mocha/mocha.js',
'node_modules/chai/chai.js',
'node_modules/mocha-clean/index.js',
'node_modules/sinon-chai/lib/sinon-chai.js'
],
specHelpers: [client + '/test-helpers/*.js'],
specs: [clientApp + '/**/*.spec.js'],
serverIntegrationSpecs: [],
/**
* E2E
*/
scenariosPo: scenariosPo,
scenarios: scenarios,
scenariosAllFiles: [scenariosPo, scenarios],
/**
* Node settings
*/
nodeServer: './src/server/app.js',
defaultPort: '8001'
};
/**
* karma settings
*/
config.karma = {
files: [].concat(
bowerFiles,
config.specHelpers,
clientApp + '/**/*.module.js',
clientApp + '/**/*.js',
config.templateCache.path + config.templateCache.file),
preprocessors: {}
};
config.karma.preprocessors['{' + clientApp + ',' +
clientApp + '/**/!(*.spec).js}'] = 'coverage';
return config;
};