-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
69 lines (59 loc) · 1.36 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
/**
* Clyde Theme Build tasks
*
* Use these tasks to build a production-ready
* version of the Clyde theme.
*/
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
require('time-grunt')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
theme: {
dev: 'src',
assets: 'src/assets',
dist: 'dist',
codeName: 'Clyde Foxx' // With two x's on purpose
},
// watch task
watch: {
options: {
reload: true,
debounceDelay: 500
},
styles: {
files: ['<%= theme.assets %>/less/**/*.less'],
tasks: ['less']
},
scripts: {
files: ['<%= theme.assets %>/js/**/*.js', 'Gruntfile.js'],
tasks: ['jshint']
}
},
// connect server
connect: {}, // not used currently
// jshint
jshint: {
dev: ['<%= theme.assets %>/js/**/*.js', 'Gruntfile.js']
},
// compile less
less: {
main: {
files: {
'<%= theme.assets %>/css/style.css': ['<%= theme.assets %>/less/style.less']
}
}
},
// document any JS
docco: {},
// shell commands
shell: {
installTheme: {
commands: ['rm -rf ../test_theme', 'mv dist/ ../test_theme']
}
}
});
// Tasks
grunt.registerTask('default', ['develop']);
grunt.registerTask('develop', ['watch']);
};