forked from DesignRevision/shards-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
25 lines (21 loc) · 807 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
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var sass = require('gulp-sass');
var cleanCSS = require('gulp-clean-css');
var rename = require('gulp-rename');
gulp.task('default', ['serve']);
gulp.task('compile:sass', function () {
return gulp.src('styles/scss/shards-dashboards.scss')
.pipe(sass({ outputStyle: 'expanded' }).on('error', sass.logError))
.pipe(rename({ suffix: '.' + require('./package.json').version}))
.pipe(gulp.dest('./styles'))
.pipe(cleanCSS())
.pipe(rename({ suffix: '.min'}))
.pipe(gulp.dest('./styles'))
.pipe(browserSync.stream());
});
gulp.task('compile', ['compile:sass']);
gulp.task('serve', ['compile'], function () {
browserSync.init({ server: '.' });
gulp.watch('styles/**/*.scss', ['compile:sass']);
});