forked from caninojories/farmer
/
gulp.config.js
106 lines (99 loc) · 3.14 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
(function() {
'use strict';
module.exports = function() {
var wiredep = require('wiredep');
var bowerFiles = wiredep({devDependencies: true})['js'];
var config = {
adminRoutes: 'front-end/views/admin/**/*.*',
alljs: [
'front-end/resources/js/**/*.js',
'./*.js',
'back-end/**/*.js'
],
build: './build/',
client: 'front-end/views/',
clientRoutes: 'front-end/views/client/**/*.*',
commons: 'front-end/views/commons/**/*.*',
css: 'front-end/.tmp/stylus/app.css',
fonts: ['front-end/resources/fonts/**/*.*', 'front-end/bower/bootstrap/fonts/*.*',
'front-end/bower/ionicons/fonts/*.*', 'front-end/bower/flat-ui/fonts/**/*.*'],
htmlTemplates: 'front-end/views/**/*.html',
images: 'front-end/resources/img/**/*.*',
index: 'front-end/views/index.html',
js: [
'front-end/resources/js/custom/*.js',
'front-end/resources/js/app.js',
'front-end/resources/js/**/*.module.js',
'front-end/resources/js/services/restangular.js',
'front-end/resources/js/**/*.js'
],
stylus: 'front-end/resources/css/stylus/app.styl',
server: './back-end',
temp: 'front-end/.tmp/',
templateCache: {
file: 'templates.js',
options: {
module: 'app.core',
standalone: false,
}
},
/*Bower and Npm Configurations*/
bower: {
json: require('./bower.json'),
directory: '.bowerrc'.directory,
exclude: ['..bower/bootstrap/dist/js/bootstrap.js'],
ignorePath: '../bower',
fileTypes: {
html: {
replace: {
js: '<script src="/bower{{filePath}}"></script>',
css: '<link rel="stylesheet" href="/bower{{filePath}}" />'
}
}
}
},
specHelpers: ['front-end/test-helpers/*.js'],
serverIntegrationSpecs: ['front-end/tests/server-integration/**/*.spec.js'],
/* Node Server*/
defaultPort: 3004,
nodeServer: './back-end/server.js'
};
config.getWireDepDefaultOptions = function() {
var options = {
bowerJson: config.bower.json,
directory: config.bower.directory,
exclude: config.bower.exclude,
ignorePath: config.bower.ignorePath,
fileTypes: config.bower.fileTypes
};
return options;
};
config.karma = getKarmaOptions();
return config;
function getKarmaOptions() {
var options = {
files: [].concat(
bowerFiles,
config.specHelpers,
'front-end/resources/js/**/*.module.js',
'front-end/resources/js/**/*.js',
'front-end/.tmp/templates.js'
//config.serverIntegrationSpecs
),
exclude: [],
coverage: {
dir: './report/coverage',
reporters: [
{type: 'html', subdir: 'report-html'},
{type: 'lcov', subdir: 'report-lcov'},
{type: 'text-summary'}
]
},
preprocessors: {
}
};
options.preprocessors['front-end/' + '**/!(*.spec)+(.js)'] = ['coverage'];
return options;
}
};
}());