forked from jakegiltsoff/svgontheweb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
32 lines (29 loc) · 793 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
var gulp = require('gulp');
var sass = require('gulp-sass');
var globbing = require('gulp-css-globbing');
var rename = require('gulp-rename');
var minifyCss = require('gulp-minify-css');
var webserver = require('gulp-webserver');
gulp.task('sass', function() {
gulp.src('./assets/sass/style.scss')
.pipe(globbing({
extensions: ['.scss']
}))
.pipe(sass())
.pipe(gulp.dest('./assets/css/'))
.pipe(minifyCss())
.pipe(rename({
extname: '.min.css'
}))
.pipe(gulp.dest('./assets/css/'));
});
gulp.task('serve', function() {
gulp.src('.')
.pipe(webserver({
port: 1234,
livereload: true
}));
});
gulp.task('default', ['sass', 'serve'], function() {
gulp.watch(['./assets/sass/*.scss', './assets/sass/**/*.scss'], ['sass']);
});