-
Notifications
You must be signed in to change notification settings - Fork 7
/
gulpfile.js
34 lines (25 loc) · 864 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');
var stylus = require('gulp-stylus');
var rename = require('gulp-rename');
var minifyCSS = require('gulp-minify-css');
var nib = require('nib');
gulp.task('stylus', function () {
return gulp.src('./stylus/index.styl')
.pipe(stylus({use: [nib()]}))
.pipe(minifyCSS())
.pipe(rename('styles.css'))
.pipe(gulp.dest('./assets'));
});
gulp.task('stylus-docs', function () {
return gulp.src('./ui-docs/docs.styl')
.pipe(stylus({use: [nib()]}))
.pipe(gulp.dest('./ui-docs'));
});
gulp.task('stylus-watch', ['stylus'], function () {
gulp.watch('./stylus/**/*.styl', ['stylus', 'stylus-docs']);
});
gulp.task('stylus-watch-docs', ['stylus-docs'], function () {
gulp.watch('./ui-docs/*.styl', ['stylus-docs']);
});
gulp.task('watch', ['stylus-watch', 'stylus-watch-docs']);
gulp.task('default', ['watch']);