forked from Aerolab/midnight.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
31 lines (27 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
29
30
31
var gulp = require('gulp')
, fs = require('fs')
, uglify = require("gulp-uglify")
, concat = require("gulp-concat")
, header = require("gulp-header");
var getVersion = function () {
info = require("./package.json");
return info.version;
};
var getCopyright = function () {
return fs.readFileSync('Copyright');
};
gulp.task('buildfromsrc', function () {
gulp.src('./midnight.jquery.src.js')
.pipe(header(getCopyright(), {version: getVersion()}))
.pipe(concat('midnight.jquery.js'))
.pipe(gulp.dest(''));
});
// task
gulp.task('minifyjs', function () {
gulp.src('./midnight.jquery.js')
.pipe(uglify())
.pipe(header(getCopyright(), {version: getVersion()}))
.pipe(concat('midnight.jquery.min.js'))
.pipe(gulp.dest(''));
});
gulp.task('default', ['buildfromsrc', 'minifyjs']);