forked from clineamb/bootstrap-drawer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
66 lines (57 loc) · 1.5 KB
/
gulpfile.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
// --- bootstrap.offcanvas gulpfile
var VERSION = "0.9.0";
var gulp = require('gulp'),
less = require('gulp-less'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename')
;
gulp.task("build", ['less', 'less.min', 'js', 'js.min', 'example']);
gulp.task('example', function() {
gulp.src([
"./dist/js/drawer.js",
"./bower_components/bootstrap/dist/css/bootstrap.min.css",
"./bower_components/bootstrap/dist/js/bootstrap.min.js"
])
.pipe(gulp.dest("./example"))
;
});
gulp.task("less", function() {
gulp.src("./less/bootstrap-drawer.less")
.pipe(less({
paths: ["./less"]
}))
.pipe(gulp.dest("./example"))
;
gulp.src("./less/bootstrap-drawer.less")
.pipe(less({
paths: ["./less"],
debug: true
}))
.pipe(gulp.dest("./dist/css"))
;
});
gulp.task("less.min", function() {
gulp.src("./less/bootstrap-drawer.less")
.pipe(less({
paths: ["./less"],
compress: true
}))
.pipe(rename("bootstrap-drawer.min.css"))
.pipe(gulp.dest("./dist/css"))
;
});
gulp.task('js', function() {
gulp.src("./js/*.js")
.pipe(gulp.dest("./dist/js"))
;
gulp.src("./js/*.js")
.pipe(gulp.dest("./example"))
;
});
gulp.task('js.min', function() {
gulp.src("./js/*.js")
.pipe(uglify())
.pipe(rename({extname: ".min.js"}))
.pipe(gulp.dest("./dist/js"))
;
});