forked from mgechev/angular-seed
-
Notifications
You must be signed in to change notification settings - Fork 0
Deployment as WAR
Minko Gechev edited this page Sep 12, 2016
·
1 revision
- Define a destination directory e.g. in
/tools/config/seed.config.ts
WAR_DEST = `${this.DIST_DIR}/`;
- Create a task in
/tasks/project/build.war.ts
:
import * as gulp from 'gulp';
var war = require('gulp-war');
var zip = require('gulp-zip');
import {
APP_DEST, WAR_DEST
} from '../../config';
export = () => {
return gulp.src(APP_DEST + '/**')
.pipe(war({
welcome: 'index.html',
displayName: 'THE NAME OF MY APPLICATION',
}))
.pipe(zip('theNameOfMyApplication.war'))
.pipe(gulp.dest(WAR_DEST));
};
- Add in gulpfile.ts your new task
'build.war'
e.g. in'build.prod'
beforedone