-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
72 lines (58 loc) · 1.45 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
module.exports = function (grunt) {
'use strict';
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
// ====================
// == config vars =====
// ====================
var options = {
pkg: require('./package'), // <%=pkg.name%>
/**
* Grunt global vars
* Many of the Grunt tasks use these vars
*/
config : {
src: "_grunt-configs/*.js",
css : {
distDir : 'public/css', // <%=config.css.distDir%>
srcFile : 'kickoff', // <%=config.css.srcFile%>
scssDir : 'public/scss' // <%=config.css.scssDir%>
},
js : {
distDir : 'public/js/dist/', // <%=config.js.distDir%>
distFile : 'script.min.js', // <%=config.js.distFile%>
jsDir : 'public/js', // <%=config.js.jsDir%>
srcFile : 'script.js', // <%=config.js.srcFile%>
}
}
};
// Load grunt configurations automatically
var configs = require('load-grunt-configs')(grunt, options);
// Define the configuration for all the tasks
grunt.initConfig(configs);
// =============
// === Tasks ===
// =============
// A task for development
grunt.registerTask('dev', [
'shimly',
'browserify:dev',
'sass:kickoff',
'autoprefixer:kickoff'
]);
// A task for deployment
grunt.registerTask('deploy', [
'shimly',
'browserify:prod',
'sass:kickoff',
'autoprefixer:kickoff',
'csso'
]);
// Default task
grunt.registerTask('default', [
'shimly',
'browserify:prod',
'sass:kickoff',
'autoprefixer:kickoff'
]);
};