-
Notifications
You must be signed in to change notification settings - Fork 4
/
theme_gruntfile.js
69 lines (65 loc) · 2.29 KB
/
theme_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
'use strict';
module.exports = function(grunt) {
// ----------------------------------------------------------
// WARNING, BRAVE DEVELOPER
// ----------------------------------------------------------
// Webhook allows you to use local grunt tasks and files.
// However, these tasks are ONLY RUN LOCALLY and not when
// your live site needs to be rebuilt. This means you should
// only use grunt for pre-processing tasks like building
// Sass, less or coffescript files, not for reading things
// from your templates and making dynamic changes during
// the build process. Doing so will cause your live site
// not to regerate.
//
// You have been warned!
grunt.initConfig({
// Import Bourbon, Neat and Wyrm. Generate CSS from the /sass/ folder
sass: {
dev: {
options: {
style: 'expanded',
loadPath: ['bower_components/bourbon/dist', 'bower_components/neat/app/assets/stylesheets', 'bower_components/font-awesome/scss', 'bower_components/wyrm/sass']
},
files: [{
expand: true,
cwd: 'sass',
src: ['*.sass'],
dest: 'static/css',
ext: '.css'
}]
}
},
copy: {
// Import Fontawesome fonts
fontawesome: {
files: [
{expand: true, src: ['bower_components/font-awesome/fonts/*'], dest: 'static/fonts/', flatten: true, filter: 'isFile'}
]
},
// Import the Webhook affix JS
webhookjs: {
files: [
{expand: true, src: ['bower_components/webhook-js/src/webhook-affix.js'], dest: 'static/javascript/webhook-js/', flatten: true, filter: 'isFile'}
]
},
moment: {
files: [
{expand: true, src: ['bower_components/moment/min/moment-with-locales.js'], dest: 'static/javascript/moment/', flatten: true, filter: 'isFile'}
]
}
},
watch: {
options : {
files: ['sass/**/*.sass', 'bower_components/wyrm/sass/**/*.sass'],
tasks: ['sass','build']
},
}
});
// These are the custom grunt packages we're adding
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-copy');
// NEVER REMOVE THESE LINES, OR ELSE YOUR PROJECT MAY NOT WORK
require('./options/generatorOptions.js')(grunt);
grunt.loadTasks('tasks');
};