-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
34 lines (26 loc) · 847 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
33
34
var gulp = require('gulp')
,gutil = require('gulp-util')
,stylus = require('gulp-stylus')
,autoprefixer = require('gulp-autoprefixer')
,minifyCSS = require('gulp-minify-css')
,jade = require('gulp-jade')
,uglify = require('gulp-uglify')
,rename = require('gulp-rename')
,concat = require('gulp-concat')
,size = require('gulp-size');
var nib = require('nib');
//Defining the tasks..
gulp.task('default',['watch']);
gulp.task('watch',[],function(){
return gulp.watch(['./src/stylus/**/*.styl'],['build-css']);
});
gulp.task('build-css',function(){
gulp.src(['./src/stylus/**.styl','./src/stylus/admin/**.styl'])
.pipe(concat('main.styl'))
.pipe(stylus({ use: nib(), compress: true }))
.pipe(autoprefixer())
.pipe(minifyCSS())
.pipe(rename('build.css'))
.pipe(gulp.dest('./public/css'))
.pipe(size());
});