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

35 lines
963 B
JavaScript

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