-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathgulpfile.js
More file actions
27 lines (23 loc) · 721 Bytes
/
gulpfile.js
File metadata and controls
27 lines (23 loc) · 721 Bytes
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
var gulp = require('gulp'),
clean = require('gulp-clean'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat'),
header = require('gulp-header');
// Clean dist folder
gulp.task('clean', function() {
return gulp.src('dist').pipe(clean());
});
// Copy
gulp.task('copy', function() {
return gulp.src('src/lightrouter.js')
.pipe(gulp.dest('dist'));
});
// Uglify / Compress
gulp.task('uglify', function() {
return gulp.src('src/lightrouter.js')
.pipe(uglify())
.pipe(concat('lightrouter.min.js'))
.pipe(header('/* lightrouter.js - Copyright 2014 Gary Green. Licensed under the Apache License, Version 2.0 */'))
.pipe(gulp.dest('dist'));
});
gulp.task('default', ['clean', 'copy', 'uglify']);