Created
March 26, 2015 06:19
-
-
Save yuka2py/0108694eb877ca633c5a to your computer and use it in GitHub Desktop.
gulpfile for browserify + TypeScript + React.js with JSX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var plumber = require('gulp-plumber'); | |
var browserify = require('browserify'); | |
var source = require('vinyl-source-stream'); | |
var tsify = require('tsify'); | |
var reactify = require('reactify'); | |
gulp.task('browserify', function () { | |
return browserify({ | |
entries: [App.Src + 'scripts/app.ts'], | |
transform: [reactify], | |
debug: App.DEBUG | |
}) | |
.plugin(tsify, { | |
noImplicitAny: false, //trueが望ましいが、外部ライブラリがエラーを起こすため | |
module : 'commonjs', | |
target: 'ES5' | |
}) | |
.bundle() | |
.pipe(plumber()) | |
.pipe(source('application.js')) | |
.pipe(gulp.dest(App.Dest + 'scripts/')) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tsify でエラーがおきたら gulp watch が停止するんですが、どうしたもんか。