forked from LeaVerou/awesomplete
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
31 lines (24 loc) · 789 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
29
30
31
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var header = require('gulp-header');
var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');
var banner = "// Awesomplete - Lea Verou - MIT license\n";
gulp.task('minify', function() {
return gulp.src(['awesomplete.js'])
.pipe(sourcemaps.init())
.pipe(uglify())
.pipe(rename({ suffix: '.min' }))
.pipe(header(banner))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('.'));
});
gulp.task('concat', function() {
return gulp.src(['awesomplete.base.css', 'awesomplete.theme.css'])
.pipe(sourcemaps.init())
.pipe(concat('awesomplete.css'))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('.'));
});
gulp.task('default', ['minify', 'concat']);