forked from DavidMoritz/rcv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
69 lines (62 loc) · 2.25 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
module.exports = function(grunt) {
// load in package.json to reference any data from it (like the version number)
grunt.initConfig({
pkg: grunt.file.readJSON('package.json')
});
// Define other properties of the config object
// Define the root directory for distribution
var distRoot = 'dist',
// Build main distribution path. NOTE: There is no slash at the end
distPath = distRoot + '/inc/',
// Define banner for css and js files
banner = '/*!\n' +
' * <%= pkg.description %> - v<%= pkg.version %> \n' +
' * Build Date: <%= grunt.template.today("yyyy.mm.dd") %> \n' +
' * Docs: <%= pkg.homepage %> \n' +
' * Coded @ <%= pkg.author %> \n' +
' */ \n \n';
// Set distribution path to grunt config object
// This should be used when defining output files
// Access this config option using <%= distRoot %>
grunt.config.set('distRoot', distRoot);
// Access this config option using <%= distPath %>
grunt.config.set('distPath', distPath);
// Access this config option using <%= banner %>
grunt.config.set('banner', banner);
// Load Grunt plugins from the config files in the grunt/ directory
grunt.loadTasks('grunt');
// default is just dev
grunt.registerTask('dev', [
'default',
'watch'
]);
// default is just dev
grunt.registerTask('nomysql', [
'default',
'copy:noMySql'
]);
// Register task for generating unminified output files
// This is safe to run on bamboo
// Note: all subtasks of the sass and autoprefixer tasks will run. This will generate a minified and unminified version of the css.
// If you run this task all of the example html files and generated documentation will reference the unminified version of Edge UI's css and js
grunt.registerTask('default', [
'jade',
'less:dev',
'copy:main',
'replace:dev',
'pleeease:dev',
'concat',
'jshint'
]);
// Register task for generating minified (Prod ready) output files
// Note: all subtasks of the sass and autoprefixer tasks will run. This will generate a minified and unminified version of the css.
// If you run this task all of the example html files and generated documentation will reference the minified version of Edge UI's css and js
grunt.registerTask('prod', [
'jade',
'less:prod',
'copy:main',
'replace:prod',
'pleeease:prod',
'concat'
]);
};