-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
94 lines (89 loc) · 2.72 KB
/
Gruntfile.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
/* jshint node:true */
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
pkg:grunt.file.readJSON('package.json'),
jshint:{
options:{
unused:true,
bitwise:true,
curly:true,
eqeqeq:true,
forin:true,
noarg:true,
noempty:true,
nonew:true,
undef:true,
strict:true,
devel:true
},
grunt:{
src:['Gruntfile.js']
},
application:{
options:{
globals:{
define:false,
require:false
}
},
src:['public/js/**/*.js', '!public/js/vendor/**/*.js']
},
server:{
src:[
'app.js',
'routes/**/*.js',
'config/**/*.js'
]
}
},
recess:{
options:{
noOverqualifying:false
},
lint:{
src:['public/css/style.css']
}
},
requirejs:{
build:{
options:{
preserveLicenseComments:false,
optimizeCss:'standard', //Check with IE, could break
appDir:'public/',
baseUrl:'./js',
dir:'public-build',
// keepBuildDir:true,
module:{ //check this first - something about deleting
name:'main'
}
}
}
},
clean:{
build:[ 'public-build' ]
},
htmlmin:{
build:{
options:{
removeComments:true,
collapseWhitespace:true
},
files:{
'public-build/index.html':'public/index.html',
'public-build/partials/404.html':'public/partials/404.html',
'public-build/partials/index.html':'public/partials/index.html'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-htmlmin');
grunt.registerTask('lint', ['recess', 'jshint']);
grunt.registerTask('default', ['lint']);
grunt.registerTask('build', ['lint', 'requirejs:build']);
grunt.registerTask('build:full', ['lint', 'requirejs:build', 'htmlmin']);
};