-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
51 lines (39 loc) · 1.34 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
48
49
50
51
(function () {
"use strict";
var gulp = require('gulp');
var gutil = require('gulp-util');
var coffee = require('gulp-coffee');
var clean = require('gulp-clean');
var imagemin = require('gulp-imagemin');
gulp.task('clean', function () {
return gulp.src('public', {
read: false
}).pipe(clean());
});
gulp.task('coffee', function () {
return gulp.src('./src/*.coffee')
.pipe(coffee({
bare: true
}).on('error', gutil.log))
.pipe(gulp.dest('./public/'));
});
gulp.task('copy_gremlins', function () {
return gulp.src('./src/resources/bower_components/gremlins.js/gremlins.min.js')
.pipe(gulp.dest('./public/resources/js'));
});
gulp.task('copy_js', function () {
return gulp.src('./src/resources/js/*')
.pipe(gulp.dest('./public/resources/js'));
});
gulp.task('imagemin', function () {
return gulp.src('src/resources/images/*')
.pipe(imagemin())
.pipe(gulp.dest('public/resources/images'));
});
gulp.task('default', ['coffee', 'imagemin', 'copy_gremlins', 'copy_js'], function () {
// place code for your default task here
gulp.watch('./src/*.coffee', function () {
gulp.run('coffee');
});
});
})();