forked from jdan/isomer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
28 lines (24 loc) · 825 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
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var insert = require('gulp-insert');
/* Main gulp task to minify and concat assets */
gulp.task('build', function () {
gulp.src(['./js/isomer.js', './js/!(isomer)*.js'])
.pipe(uglify())
.pipe(concat('isomer.min.js'))
.pipe(gulp.dest('./build'));
});
/* Task for testing purposes - concat without minifying */
gulp.task('concat', function () {
gulp.src(['./js/isomer.js', './js/!(isomer)*.js'])
.pipe(concat('isomer.js'))
.pipe(gulp.dest('./build'));
});
gulp.task('node', function () {
gulp.src(['./js/isomer.js', './js/!(isomer)*.js'])
.pipe(concat('isomer.js'))
.pipe(insert.append('\nmodule.exports = Isomer;'))
.pipe(gulp.dest('./build'));
});
gulp.task('default', ['build']);