-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
57 lines (51 loc) · 1.02 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
copy: {
build: {
cwd: 'src',
src: ['index.html'],
dest: 'dist',
expand: true
}
},
clean: {
build: {
src: ['dist']
}
},
sass: {
dist: {
options: {
style: 'expanded',
sourcemap: 'none'
},
files: [{
expand: true,
cwd: 'src/stylesheets',
src: ['**/*.scss'],
dest: 'dist',
ext: '.css'
}]
}
},
watch: {
stylesheets: {
files: ['src/stylesheets/*.scss'],
tasks: ['stylesheets'],
options: {
spawn: false
}
}
}
});
// Register your plugins here
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
// Register your tasks here
grunt.registerTask('stylesheets', ['sass']);
grunt.registerTask('build', ['clean', 'copy', 'stylesheets']);
grunt.registerTask('default', ['build', 'watch']);
};