Comments (7)
The "(while aliasify was processing..." is added right before we call emit here:
https://github.com/benbria/browserify-transform-tools/blob/master/src/transformTools.coffee#L76
What do you mean by getting an error event on the builder?
from browserify-transform-tools.
For example here browserify emits an error event. This allows using something like:
app.use(function(req, res, next) {
var builder = browserify();
var writer = getFileStream();
builder.on('error', next);
writer.on('finish', next);
});
in development mode I then would get a http 500 response and can easily fix the typo else I always have to restart the daemon as node crashes (which is not so nice if there should be an error in production).
from browserify-transform-tools.
I added this unit test and this unit test, and both pass the way I'd expect them to.
I started working on a unit test that actually uses browserify (and found a bug in the latest browserify :P), but I found I'd get the error in the bundle() callback, but not in my error handler. I notice that the browserify docs don't mention an error event, although you plainly found one in the source. :/
from browserify-transform-tools.
That code example you gave me isn't complete, yes? I mean, I don't see where you actually call into browserify... Do you have a more complete example I can try out?
from browserify-transform-tools.
I found my mistake: The error event is emitted on the stream which is returned by bundle()
not on browserify()
itself ^^
Sry should have tried this before...
from browserify-transform-tools.
No worries. It forced me to write some more unit tests, which isn't a bad
thing. ;)
On Dec 29, 2013 9:33 AM, "Bodo Kaiser" [email protected] wrote:
I found my mistake: The error event is emitted on the stream which is
returned by bundle() not on browserify() itself ^^Sry should have tried this before...
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-31317964
.
from browserify-transform-tools.
Glad it was not totally useless though its generally a bad thing searching mistakes at others :)
However think this was the last time :p
Am 29.12.2013 um 15:46 schrieb Jason Walton [email protected]:
No worries. It forced me to write some more unit tests, which isn't a bad
thing. ;)
On Dec 29, 2013 9:33 AM, "Bodo Kaiser" [email protected] wrote:I found my mistake: The error event is emitted on the stream which is
returned by bundle() not on browserify() itself ^^Sry should have tried this before...
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-31317964
.—
Reply to this email directly or view it on GitHub.
from browserify-transform-tools.
Related Issues (11)
- Loading configuration is overly complicated HOT 2
- Incorrect Falafel dependency HOT 1
- supporting `require` aliases HOT 5
- Do requireTransforms allow for relative path changes?
- Not able to programatically specify what file extensions are included HOT 5
- Supporting `appliesTo` configuration being set through command line HOT 1
- require transform parse error on 'const' (and probably others) HOT 2
- Only parse js extensions HOT 1
- Configuration can only be set in the top level package HOT 4
- Accept transform options provided upstream HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from browserify-transform-tools.