-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
38 lines (31 loc) · 1.23 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
var gulp = require('gulp');
var concat = require("gulp-concat")
var minifyCSS = require('gulp-minify-css');
var less = require('gulp-less');
var source = require('vinyl-source-stream');
var paths = {
cssfiles : ["./bower_components/bootstrap/dist/css/*.min.css", "./bower_components/jquery-ui/themes/ui-lightness/*.min.css", "./bower_components/animate.css/animate.min.css", "./css/style.css"],
jsfiles : [ "./bower_components/jquery/jquery.min.js", "./bower_components/jquery.scrollTo/*.min.js", "./bower_components/bootstrap/dist/js/*.min.js", "./node_modules/mithril/mithril.min.js", "./script.js" ],
less : [ "./less/*.less"]
}
gulp.task("less", function(){
gulp.src(paths.less)
.pipe(less())
.pipe(gulp.dest('./css'));
})
gulp.task('css', ["less"], function(){
return gulp.src(paths.cssfiles)
.pipe(concat('bundle.css'))
.pipe(minifyCSS({keepBreaks:true}))
.pipe(gulp.dest('./demo/'))
});
gulp.task('js', function(){
return gulp.src(paths.jsfiles)
.pipe(concat('bundle.js'))
.pipe(gulp.dest('./demo/'))
});
gulp.task('watch', function() {
gulp.watch(paths.less, ['css']);
gulp.watch(paths.jsfiles, ['js']);
});
gulp.task("default", ["css", "js", "watch"]);