-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
70 lines (64 loc) · 2 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
/*jslint node: true */
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options: {
outputStyle: 'expanded',
sourceMap: false,
includePaths: ['node_modules/foundation-sites/scss'],
},
files: {
'css/style.css': 'scss/style.scss'
}
}
}, // sass
watch: {
options: {
livereload: true,
dateFormat: function(time) {
grunt.log.writeln('The watch finished in ' + time + 'ms at ' + (new Date()).toString());
grunt.log.writeln('Waiting for more changes...');
} //date format function
}, //options
scripts: {
files: ['*.js', 'js/*.js']
}, // scripts
//Live Reload of SASS
sass: {
files: 'scss/**/*.scss',
tasks: ['sass']
}, //sass
css: {
files: ['scss/*.scss'],
tasks: []
},
html: {
files: ['*.html']
}, //html
all: {
files: '{,**/}*.js',
tasks: ['jshint']
} //all
}, //watch
postcss: {
options: {
processors: [
require('autoprefixer')({
browsers: 'last 2 versions'
})
]
}
}, //post css
jshint: {
options: {
reporter: require('jshint-stylish')
},
target: ['*.js', 'js/*.js'],
all: ['*.js', 'js/*.js']
} //jshint
});
require('load-grunt-tasks')(grunt);
grunt.registerTask('default', ['sass', 'openport:watch.options.livereload:35729', 'watch', 'force:jshint']);
};