-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGruntfile.js
70 lines (61 loc) · 1.22 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
module.exports = function(grunt) {
'use strict';
var config = {
watch: {
sass: {
files: ['sass/**/*.scss'],
tasks: ['sass']
},
gruntfile: {
files: 'Gruntfile.js',
tasks: ['jshint:gruntfile']
},
js: {
files: 'js/*.js',
tasks: ['jshint:js']
},
livereload: {
options: {
livereload: true
},
files: ['css/**/*.css']
}
},
pkg: grunt.file.readJSON('package.json'),
// Compile SCSS to CSS
sass: {
dev: {
options: {
includePaths: [
require('node-bourbon').includePaths[0],
'../JointsWP/library/scss'
],
//outputStyle: 'compressed',
sourceComments: 'map'
},
files: {
'css/main.css': 'sass/main.scss'
}
}
},
jshint: {
gruntfile: {
src: ['Gruntfile.js']
},
js: {
files: ['js/*/**.js']
}
}
};
// Comment here and uncomment the other task to use ruby sass
grunt.loadNpmTasks('grunt-sass'); // sassc
//grunt.loadNpmTasks('grunt-contrib-sass'); // ruby sass
// Load other npm tasks
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-jshint');
// Register tasks
grunt.initConfig(config);
grunt.registerTask('default', 'Launch the sassc compile', [
'sass'
]);
};