This repository has been archived by the owner on Nov 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathGruntfile.js
66 lines (62 loc) · 1.85 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
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
autoprefixer: {
options: {
browsers: ['last 4 versions', 'ie 8', 'ie 9']
},
main: {
src: 'src/scss/multi-timeline.unprefixed.css',
dest: 'dist/multi-timeline.min.css'
}
},
uglify: {
js: {
options: {
sourceMap: true
},
files: {
'dist/multi-timeline.min.js': 'src/js/multi-timeline.js',
}
}
},
watch: {
options: {
livereload: true
},
scripts: {
files: ['src/js/*.js'],
tasks: ['uglify'],
options: {
spawn: false
}
},
css: {
files: ['src/scss/*.scss'],
tasks: ['sass', 'autoprefixer', 'clean'],
options: {
spawn: false
}
}
},
sass: {
dest: {
options: {
'sourcemap=none': true,
style: 'compressed'
},
files: {
'src/scss/multi-timeline.unprefixed.css': 'src/scss/multi-timeline.scss'
}
}
},
clean: {
css: ['src/scss/multi-timeline.unprefixed.css']
}
});
// 3. Where we tell Grunt we plan to use this plug-in.
require('load-grunt-tasks')(grunt);
// 4. Where we tell Grunt what to do when we type "grunt" into the terminal.
grunt.registerTask('default', ['uglify', 'sass', 'autoprefixer', 'clean']);
grunt.registerTask('dev', ['watch']);
};