forked from ulrichson/zoomood
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGulpfile.js
32 lines (27 loc) · 830 Bytes
/
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
'use strict';
// plugins
var gulp = require('gulp'),
cssmin = require('gulp-cssmin'),
less = require('gulp-less'),
server = require('gulp-livereload'),
autoprefixer = require('gulp-autoprefixer');
// other vars
var cssRoot = 'public/css/';
gulp.task('less', function() {
gulp.src(cssRoot + 'less/style.less')
.pipe(less())
.pipe(autoprefixer())
.pipe(gulp.dest(cssRoot));
})
gulp.task('build', ['less'], function() {
gulp.src(cssRoot + 'style.css') // DOES NOT WORK.........................
.pipe(cssmin({keepSpecialComments:0}))
.pipe(gulp.dest(cssRoot));
});
gulp.task('default', function () {
server.listen();
gulp.watch('public/css/less/**/*.less', ['less']);
gulp.watch(['public/**/*.css','app/**/*']).on('change', function(file) {
server.changed(file.path);
});
});