forked from erulabs/racksjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
43 lines (37 loc) · 1.01 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
// SkinnyJS Gulpfile
"use strict";
var source = [ 'src/racks.coffee', 'src/utils.coffee' ],
products = [ 'src/products/*.coffee' ],
test = [ 'test/**/*.coffee' ],
dest = 'dist',
gulp = require('gulp'),
coffee = require('gulp-coffee'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
rename = require('gulp-rename'),
gutil = require('gulp-util');
gulp.task('sources', function () {
return gulp.src(source)
.pipe(coffee())
.pipe(gulp.dest(dest))
.on('error', gutil.log);
});
gulp.task('products', function () {
return gulp.src(products)
.pipe(coffee())
.pipe(gulp.dest(dest + '/products'))
.on('error', gutil.log);
});
gulp.task('tests', function () {
return gulp.src(test)
.pipe(coffee())
.pipe(concat('test.js'))
.pipe(gulp.dest('test'))
.on('error', gutil.log);
});
gulp.task('default', ['sources', 'tests', 'products']);
gulp.task('watch', ['default'], function () {
gulp.watch(source, ['sources']);
gulp.watch(products, ['products']);
gulp.watch(test, ['tests']);
});