-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.js
93 lines (81 loc) · 2.54 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
'use strict';
module.exports = function (grunt) {
var pkg = require('./package.json');
var timer = require("grunt-timer");
timer.init(grunt);
var paths = {
src: "./src",
dist: "./dist",
test: "./test",
fixtures: "./fixtures"
};
////////////////////////
// Configure Tasks
////////////////////////
// require('./grunt_tasks/sass.js')(grunt, pkg, paths);
require('./grunt_tasks/cpsass.js')(grunt, pkg, paths); // For CPUX only
require('./grunt_tasks/javascript.js')(grunt, pkg, paths);
require('./grunt_tasks/bump.js')(grunt, pkg, paths);
require('./grunt_tasks/testing.js')(grunt, pkg, paths);
require('./grunt_tasks/files.js')(grunt, pkg, paths);
require('./grunt_tasks/cpfiles.js')(grunt, pkg, paths); // For CPUX only
require('./grunt_tasks/server.js')(grunt, pkg, paths);
grunt.config.merge({
pkg: grunt.file.readJSON('package.json')
});
require('load-grunt-tasks')(grunt);
// Default task compiles a distributable copy of the repo
grunt.registerTask('default', [
'clean', // files
'copy:templates', // files
'copy:data', // files
'copy:schemas', // files
'copy:images', // files
'jsonlint', // js
'jshint', // js
'bower_concat', // js
"sass_globbing", // sass
'sass', // sass
'autoprefixer:dev', // sass
'concat', // js
'modernizr:dist', // sass
]);
// Default task compiles a distributable copy of the repo
grunt.registerTask('cp', [
'clean', // files
'copy:cp_templates', // files
'copy:cp_data', // files
'copy:cp_schemas', // files
'copy:cp_images', // files
'jsonlint', // js
'jshint', // js
'bower_concat', // js
// 'sass_globbing', // sass
'sass', // sass
'autoprefixer:dev', // sass
'concat', // js
'modernizr:dist', // sass
]);
// Dev task is like default but includes tasks needed for testing or development
grunt.registerTask('dev', [
'clean', // files
'copy', // files
'jsonlint', // js
'jshint', // js
'bower_concat', // js
"sass_globbing", // sass
'sass', // sass
'autoprefixer:dev', // sass
'concat', // js
'modernizr:dist', // sass
]);
grunt.registerTask('watcher', [
"dev",
'php:dist', // server
"watch"
]);
grunt.registerTask('lint', [
'jsonlint', // js
'jshint' // js
]);
};