-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
44 lines (41 loc) · 1.17 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
'use strict';
module.exports = function ( grunt ) {
// load all grunt tasks matching the `grunt-*` pattern
// Ref. https://npmjs.org/package/load-grunt-tasks
require( 'load-grunt-tasks' )( grunt );
grunt.initConfig( {
// watch for changes and trigger sass, uglify and livereload
watch: {
sass: {
files: [ 'sass/**/*.{scss,sass}' ],
tasks: [ 'sass', 'autoprefixer' ]
}
},
// sass
sass: {
dist: {
options: {
style: 'expanded'
},
files: {
'dist/grid.css': 'scss/grid.scss'
}
}
},
// autoprefixer
autoprefixer: {
options: {
browsers: [ 'last 2 versions', 'ie 10', 'ios 6', 'android 4' ],
map: true
},
files: {
expand: true,
flatten: true,
src: 'dist/grid.css',
dest: 'dist'
}
}
} );
// register task
grunt.registerTask( 'default', [ 'sass', 'autoprefixer', 'watch' ] );
};