-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combining gulp-typescript with browserify #166
Comments
Browserify can't use a gulp stream as it's input. I've been using browserify in a different task:
In your situation you could use 3 tasks:
If you don't want to write files to the disk, you could also use my project small: var small = require('small').gulp;
var tsResult = gulp.src('lib/**/*.ts').pipe(ts({ module: 'commonjs' }));
var babelResult = gulp.src('lib/**/*.js').pipe(babel());
return merge([tsResult, babelResult])
.pipe(small({
outputFileName: {
standalone: 'output.standalone.js'
}
}))
.pipe(gulp.dest('dest')); Note that small isn't very stable at the moment & doesn't support circular dependencies (but I'm working on that). |
Hi @ivogabe, Thanks for the suggestions. I might try the writing to disk suggestion - though I wonder how performant that might be. The frustrating thing is trying to mix and match babel and TypeScript. Despite the best will in the world they're kind of fighting each other at present with my TSIFY experiments. I may try writing to disk as you suggest with gulp-typescript and then having browerserify work on both the es6 code and the transpiled ts too. It's more painful than you'd hope at present.... |
@johnnyreilly Ok if I close this? Or do you have some other question related to this? |
Go for it. I'm about to have another go now that 1.6 beta has shipped. I don't have a solution yet but there's no action required here in the meantime |
Hi,
I've done a little digging around but haven't found anything and so I thought I'd raise an issue here. Has anyone tried combining gulp-typescript with babel/browserify? I already have a project which is using babel and I want to try and move it across slowly to TypeScript. This means having browserify, babel and typescript in the mix together for a little while.
I'd initially tried using tsify but stumbled upon an issue related to external dependencies. So I'm wondering if anyone has any experience of gulp-typescript playing nicely with browserify?
The text was updated successfully, but these errors were encountered: