forked from JulienPittolaz/hydrotech
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
47 lines (41 loc) · 1.17 KB
/
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
44
45
46
47
var gulp = require("gulp"),
concat = require("gulp-concat"),
uglify = require("gulp-uglify"),
sass = require('gulp-sass'),
cssmin = require("gulp-cssmin"),
rename = require('gulp-rename'),
gutil = require('gulp-util'),
filter = require("gulp-filter"),
plumber = require('gulp-plumber');
var config = {
paths: {
javascript: {
src: "app/js/*.js",
dest: "assets/js"
},
css: {
src: "resources/assets/sass/app.scss",
dest: "public/css"
}
}
};
gulp.task("scripts", function(){
return gulp.src(config.paths.javascript.src)
.pipe(plumber())
.pipe(concat("app.js"))
.pipe(uglify())
.pipe(gulp.dest(config.paths.javascript.dest));
});
gulp.task("css", function(){
gulp.src(config.paths.css.src)
.pipe(plumber())
.pipe(sass())
.pipe(cssmin())
//.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest(config.paths.css.dest));
});
gulp.task("default", ["watch", "css"]);
gulp.task('watch', function() {
//gulp.watch('app/js/**/*.js', ['scripts']);
gulp.watch('app/sass/**/*.scss', ['css']);
});