forked from mladenplavsic/bootstrap-navbar-sidebar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
43 lines (38 loc) · 870 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
35
36
37
38
39
40
41
42
43
var gulp = require('gulp');
var sass = require('gulp-sass');
var cleanCSS = require('gulp-clean-css');
var rename = require('gulp-rename');
var gls = require('gulp-live-server');
gulp.task('default', [
'docs'
]);
gulp.task('sass', function () {
return gulp.src([
'./src/navbar-fixed-right.scss',
'./src/navbar-fixed-left.scss'
])
.pipe(sass({
outputStyle: 'expanded'
}).on('error', sass.logError))
.pipe(gulp.dest('dist'))
.pipe(cleanCSS())
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest('dist'));
});
gulp.task('docs', ['sass'], function () {
return gulp.src([
'./dist/*.min.css'
])
.pipe(gulp.dest('docs'))
});
gulp.task('watch', function () {
gulp.watch('./src/*.scss', [
'docs'
]);
});
gulp.task('serve', function() {
var server = gls.static(['./docs/']);
server.start();
});