1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/gulpfile.js

35 lines
963 B
JavaScript
Raw Normal View History

2017-06-03 04:31:51 +08:00
var ts = require('gulp-typescript');
var gulp = require('gulp');
2017-06-03 05:21:05 +08:00
var zip = require('gulp-zip');
2017-06-03 04:31:51 +08:00
var runSequence = require('run-sequence');
2017-06-03 05:48:46 +08:00
var tsProject = ts.createProject('tsconfig.json');
2017-06-03 04:31:51 +08:00
gulp.task('compile-release', function () {
2017-06-03 05:48:46 +08:00
return gulp.src([
"frontend/**/*.ts",
"common/**/*.ts",
"backend/**/*.ts"], {base: "."})
.pipe(tsProject())
.js
.pipe(gulp.dest("."))
2017-06-03 04:31:51 +08:00
});
2017-06-03 05:21:05 +08:00
gulp.task('zip-release', function () {
2017-06-03 05:48:46 +08:00
return gulp.src(['package.json',
"README.md",
"LICENSE",
"frontend/**/*.js",
"common/**/*.js",
"backend/**/*.js",
"frontend/**/*.+(png|ejs|html|css)",
"frontend/systemjs*"], {base: "."})
2017-06-03 05:21:05 +08:00
.pipe(zip('pigallery2.zip'))
2017-06-03 05:48:46 +08:00
.pipe(gulp.dest('.'));
2017-06-03 05:21:05 +08:00
});
2017-06-03 04:31:51 +08:00
gulp.task('build-release', function (done) {
2017-06-03 05:48:46 +08:00
runSequence('compile-release', 'zip-release', function () {
2017-06-03 04:31:51 +08:00
console.log('Run something else');
done();
});
});