Skip to content

Commit

Permalink
fix dev&prod main.ts compile
Browse files Browse the repository at this point in the history
  • Loading branch information
MOTOO11 committed Dec 17, 2016
1 parent 16e6eb4 commit 19b6bf9
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,36 @@ gulp.task('wp:r', () => {
});


gulp.task('ts:compile', () => {
return gulp.src(["./src/electron/ts/Main.ts", "./src/electron/ts/Server.ts"])
gulp.task('ts:compile', ["ts:compile:server"], () => {
return gulp.src(["./src/electron/ts/Main.ts"])
.pipe(ts({
target: 'ES5',
removeComments: true
}))
.js
// .pipe(rename("main.js"))
.pipe(rename("main.js"))
.pipe(gulp.dest(config.dist));
});
gulp.task('ts:compile:server', () => {
return gulp.src(["./src/electron/ts/Server.ts"]).pipe(ts({
target: 'ES5',
removeComments: true
}))
.js
.pipe(gulp.dest(config.dist));
});

gulp.task('ts:compile:prod', () => {
return gulp.src(["./src/electron/ts/Main.prod.ts", "./src/electron/ts/Server.ts"]).pipe(ts({
gulp.task('ts:compile:prod', ["ts:compile:server"], () => {
return gulp.src(["./src/electron/ts/Main.prod.ts"]).pipe(ts({
target: 'ES5',
removeComments: true
}))
.js
// .pipe(rename("main.js"))
.pipe(rename("main.js"))
.pipe(gulp.dest(config.dist));
});


gulp.task("html:useref", () => {
return gulp.src(config.dist + "**/*.html")
.pipe(useref())
Expand Down

0 comments on commit 19b6bf9

Please sign in to comment.