-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpconfig.js
69 lines (68 loc) · 2.47 KB
/
gulpconfig.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
var SRC = "./src";
var DEST = "./build";
module.exports = {
browserSync: {
server: {
// Serve up our build folder
baseDir: DEST
}
},
sass: {
src: SRC + "/sass/**/*.{sass,scss}",
dest: DEST + '/css/',
settings: {
imagePath: 'images' // Used by the image-url helper
//errorLogToConsole: true
//outputStyle: 'compressed'
}
},
images: {
src: SRC + "/images/**",
dest: DEST + "/images"
},
//TODO CURRENTLY TEMPLATES ARE IN JS AND HTML FORMAT (WHEN USING JST)
markup: {
//src: SRC + "/views/**",
src: SRC + "/views/index.html",
dest: DEST
},
//compiled js file with html templates
//TODO CURRENTLY TEMPLATES ARE IN JS AND HTML FORMAT (WHEN USING JST)
templates: {
src: SRC + '/views/*.html',
dest: SRC + "/javascript" //if needs to be added to functions.js for use with browserify
//dest: DEST + "/templates" //if needs to be included separately
},
browserify: {
// A separate bundle will be generated for each bundle config in the list below
bundleConfigs: [
//{
// //entries: SRC + '/javascript/global.coffee',
// dest: DEST,
// //outputName: 'global.js',
// // Additional file extentions to make optional
// //extensions: ['.coffee', '.hbs'],
// // list of modules to make require-able externally
// require: ['jquery', 'backbone/node_modules/underscore']
// // See https://github.com/greypants/gulp-starter/issues/87 for note about
// // why this is 'backbone/node_modules/underscore' and not 'underscore'
//},
{
entries: SRC + '/javascript/functions.js',
dest: DEST + '/js/',
outputName: 'functions.js',
// list of externally available modules to exclude from the bundle
//external: ['jquery', 'underscore']
// list of modules to make require-able externally
//todo do i need backbone.localstorage in here?
require: ['jquery', 'backbone/node_modules/underscore', 'backbone']
}
]
},
production: {
cssSrc: DEST + '/css/*.css',
jsSrc: DEST + '/js/*.js',
//htmlSrc: DEST + '/templates/*.js', //todo needed?
dest: DEST
}
};