forked from LunarLogic/starability
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
33 lines (30 loc) · 816 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
var gulp = require('gulp');
var sass = require('gulp-sass');
var rename = require('gulp-rename');
var autoprefixer = require('gulp-autoprefixer');
var cssnano = require('gulp-cssnano');
var runSequence = require('run-sequence');
gulp.task('output-css', function() {
return gulp.src('starability-scss/**/*.scss')
.pipe(sass({outputStyle: 'expanded'}))
.pipe(autoprefixer())
.pipe(rename({
dirname: 'starability-css',
prefix: 'starability-',
}))
.pipe(gulp.dest('./'))
.pipe(rename({
dirname: 'starability-minified',
suffix: '.min'
}))
.pipe(cssnano())
.pipe(gulp.dest('./'));
});
gulp.task('watch', function() {
gulp.watch('starability-scss/**/*.scss', ['output-css']);
});
gulp.task('default', function(callback) {
runSequence(['output-css', 'watch'],
callback
);
});