-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathproject.conf.js
74 lines (69 loc) · 1.88 KB
/
project.conf.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
/// <reference path="typings/node/node.d.ts" />
'use strict';
var fs = require('fs');
var bower = JSON.parse( fs.readFileSync( './.bowerrc', 'utf8' ) );
var tsd = JSON.parse( fs.readFileSync( './tsd.json', 'utf8' ) );
var basePath = __dirname;
var path = {
base: basePath,
client: basePath + '/client/',
outputFiles: basePath + '/client/out/',
typeDefinitions: basePath + '/' + tsd.path +'/',
customTsd: basePath + '/' + tsd.path + '/custom/', // Generated TypeScript definition files
test: {
base: basePath + '/test/',
client: basePath + '/test/client/',
e2e: basePath + '/test/client/',
outputFiles: basePath + '/test/out/'
},
bower: basePath + '/' + bower.directory + '/',
coverage: basePath + '/coverage/'
};
var karmaPreprocessors = {};
karmaPreprocessors[
path.test + '**/*.html'
] = 'ng-html2js';
karmaPreprocessors[ path.base + '/{client,client/!(bower_components)/**}/*.js' ] = 'coverage';
karmaPreprocessors[
path.outputFiles + '**/*.js',
path.test.outputFiles + '**/*.js'
] = 'sourcemap';
module.exports = {
port: 3000,
path: path,
watch: {
servedFiles: [
path.client + '**/+(*.js|*.html|*.css)',
'!' + path.bower + '**/+(*.js|*.html|*.css)', //excluded
],
typescriptFiles: [
path.client + '**/*.ts',
path.test.base + '**/*.ts'
]
},
test:{
unit:{
files : [
path.bower + 'jquery/dist/jquery.js',
path.bower + 'angular/angular.js',
path.bower + 'angular-mocks/angular-mocks.js',
path.client + '*.js',
path.outputFiles + '**/*.js',
path.client + '!(bower_components)/**/*.js',
path.test.client + '**/*.js',
path.test.outputFiles + '**/*.js'
],
exclude : [
path.test.client + '**/*.conf.js',
path.test.client + '**/*e2e-spec.js',
path.test.client + '**/*pageobject.js'
],
preprocessors: karmaPreprocessors
},
e2e: {
files: [
path.test.e2e + '**/*e2e-spec.js'
]
},
}
};