-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
34 lines (29 loc) · 999 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'),
sourcemaps = require('gulp-sourcemaps'),
concat = require('gulp-concat'),
sass = require('gulp-sass'),
webserver = require('gulp-webserver');
gulp.task('js', function(){
return gulp.src('./assets/javascript/dev/*.js')
.pipe(sourcemaps.init())
.pipe(concat('app.min.js'))
.pipe(sourcemaps.write())
.pipe(gulp.dest('./assets/javascript'))
});
gulp.task('sass', function(){
return gulp.src('./assets/stylesheets/sass/*.sass')
.pipe(sass()) // Converts Sass to CSS with gulp-sass
.pipe(gulp.dest('./assets/stylesheets/css'))
});
gulp.task('webserver', function () {
gulp.src('./')
.pipe(webserver({
livereload: true,
open: true
}));
});
gulp.task('watch', function(){
gulp.watch('./assets/stylesheets/sass/*.sass', ['sass']);
gulp.watch('./assets/javascript/dev/*.js', ['js']);
});
gulp.task('default', [ 'webserver', 'watch', 'js' ]);