-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulp_config.js
63 lines (62 loc) · 1.93 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
var pkg = require('./package.json');
var isProduction = 'production' === process.env.NODE_ENV;
module.exports = {
scripts: {
sources: [
'src/app/**/*.js',
'!src/app/**/*.spec.js',
'!src/app/**/*.e2e.js'
],
destinationFolder: isProduction ? 'production/assets/scripts' : 'public/assets/scripts',
destinationName: pkg.name + '.js'
},
sass: {
sources : ['src/app/**/*.scss'],
destinationFolder: isProduction ? 'production/assets/css' : 'public/assets/css',
destinationName: pkg.name + '.css'
},
browserify: {
sources : ['./vendor_files.js'],
destinationFolder: isProduction ? 'production/assets/scripts' : 'public/assets/scripts',
destinationName: 'bundle.js'
},
templates: {
sources : ['src/app/**/*.html'],
destinationFolder: isProduction ? 'production/assets/scripts' : 'public/assets/scripts',
},
images: {
sources : ['src/assets/images/*'],
destinationFolder : isProduction ? 'production/assets/images' : 'public/assets/images'
},
vendor: {
sources : ['node_modules/angular-material/angular-material.min.css'],
destinationFolder: isProduction ? 'production/assets/css' : 'public/assets/css',
},
assets: {
sources : ['src/assets/images/favicon.ico'],
destinationFolder : isProduction ? 'production/assets/images' : 'public/assets/images'
},
index: {
sources : ['src/index.html'],
destinationFolder : isProduction ? 'production' : 'public'
},
serve: {
baseDir : isProduction ? 'production' : 'public',
port : isProduction ? 4000 : 3000
},
coverage: {
destinationFolder: 'reports/coverage/lcov-report',
port: 5000
},
protractor: {
sources : ['src/app/**/*.e2e.js']
},
banner: ['/**',
' * <%= pkg.name %> v<%= pkg.version %>',
' * Copyright (c) <%= new Date().getFullYear() %> <%= pkg.author %>',
' * Licensed under <%= pkg.license %>',
' */',
''].join('\n')
,
isProduction : isProduction
};