forked from akrabat/slim3-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
41 lines (35 loc) · 935 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
'use strict';
var gulp = require('gulp');
var bower = require('gulp-bower');
var sass = require('gulp-sass')
var composer = require('gulp-composer');
var minify = require('gulp-minify');
// bower
gulp.task('bower', function() {
return bower('./public/lib/');
});
// sass
gulp.task('sass', function() {
gulp.src('./app/sass/**/*.scss')
.pipe(sass({
outputStyle: 'compressed'
}).on('error', sass.logError))
.pipe(gulp.dest('./public/css'));
});
gulp.task('sass:watch', function() {
gulp.watch('./app/sass/**/*.scss', ['sass']);
});
// composer
gulp.task('composer', function() {
return composer({
bin: 'composer'
});
});
// minify
gulp.task('minify', function() {
gulp.src('app/js/*.js')
.pipe(minify())
.pipe(gulp.dest('./public/js'))
});
gulp.task('watch', ['sass', 'sass:watch']);
gulp.task('default', ['bower', 'sass', 'composer', 'minify']);