-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
29 lines (26 loc) · 868 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
const gulp = require('gulp'),
sass = require('gulp-sass'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
refresh = require('gulp-refresh')
gulp.task('styles', function() {
gulp.src('resources/assets/sass/**/*.scss')
.pipe(sass({includePaths: ['resources/assets/sass']}))
//.pipe(sass().on('error', sass.logError))
.pipe(sass({outputStyle: 'compressed'}))
.pipe(gulp.dest('public/css/'))
.pipe(refresh())
});
gulp.task('scripts', function() {
gulp.src('resources/assets/js/**/*.js')
.pipe(concat('app.js'))
.pipe(uglify())
.pipe(gulp.dest('public/js/'))
.pipe(refresh())
});
//Watch task
gulp.task('default',function() {
refresh.listen()
gulp.watch('resources/assets/sass/**/*.scss',['styles']);
gulp.watch('resources/assets/js/**/*.js',['scripts']);
});