forked from iamphill/Bootstrap-Offcanvas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
104 lines (102 loc) · 3.04 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
module.exports = function(grunt) {
// Init grunt
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
/**
* Watch files for changes
**/
watch: {
sass: {
files: ["src/sass/*.scss"],
tasks: ["sass", 'autoprefixer'],
options: {
livereload: true
}
},
coffee: {
files: ["src/coffee/*.coffee"],
tasks: ["coffee", "uglify:js"],
options: {
livereload: true
}
},
livereload: {
files: "example/index.html",
options: {
livereload: true
}
}
},
/**
* Run node-sass
**/
sass: {
uncompressed: {
files: {
"dist/css/bootstrap.offcanvas.css": "src/sass/bootstrap.offcanvas.scss"
}
},
dist: {
options: {
outputStyle: "compressed"
},
files: {
"dist/css/bootstrap.offcanvas.min.css": "src/sass/bootstrap.offcanvas.scss"
}
},
test_css: {
files: {
"tests/css/bootstrap.offcanvas.css": "src/sass/bootstrap.offcanvas.test.scss"
}
}
},
autoprefixer: {
uncompressed: {
src: 'dist/css/bootstrap.offcanvas.css',
desc: 'dist/css/bootstrap.offcanvas.css'
},
dist: {
src: 'dist/css/bootstrap.offcanvas.min.css',
dest: 'dist/css/bootstrap.offcanvas.min.css'
},
test: {
src: 'tests/css/bootstrap.offcanvas.css',
dest: 'tests/css/bootstrap.offcanvas.css'
}
},
coffee: {
compile: {
files: {
"dist/js/bootstrap.offcanvas.js": "src/coffee/bootstrap.offcanvas.coffee"
}
}
},
uglify: {
js: {
options: {
banner: "/*\n" + grunt.file.read("LICENSE") + "*/\n"
},
files: {
"dist/js/bootstrap.offcanvas.min.js": ["dist/js/bootstrap.offcanvas.js"]
}
}
},
qunit: {
all: ["tests/*.html"]
},
bootlint: {
files: ['example/index.html']
}
});
// Load grunt tasks
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-bootlint');
// Grunt tasks
grunt.registerTask("default", ["watch"]);
grunt.registerTask("tests", ['bootlint', 'qunit']);
};