-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Convert to plugin #81
Comments
Any way we could make it not breaking? Just asking cause in proxiquireify it was possible somehow. |
Well it'll be a major release, so we could break things. |
I'd like to also include the runtime automatically, when we do a plugin. (I guess we can have an option to turn it off but you really shouldn't be using Traceur without the runtime.) |
What if you just want to transpile ES6 module syntax? |
Then you should probably be using a dedicated transpiler for that (e.g. es6-module-transpiler or whatever), cuz at any moment Traceur could update their transpilation to depend on the runtime (and in fact at least one of the module output formats does depend on it). |
Ok. What versions of browserify do you want to support? |
@jmm the last 5 majors should be sufficient and plugins have been around that long. |
Ok, thanks. So plugin with runtime included by default and option to opt-out? |
@domenic talking about that, I'm wondering what es6ify at this point provides that modules like 6to5 don't? |
Sounds good to me. |
Ok, thanks. What's a strategy for testing that? |
I usually just test the latest and wait for people to file bugs on anything else :P. |
Ok, I'll go with that for now. Since we're breaking BC there's no reason for |
Agreed. Might also be good to remove compileFile. |
Up to you guys. That didn't have use cases that are still relevant? |
Re: the discussion in #25 about being able to do this... browserify('./entry')
// Includes runtime by default
.plugin(es6ify) ...vs having to do this to get the runtime executed first... browserify()
.plugin(es6ify)
.add('./entry') It looks like @guzart was dealing with that by somehow prepending the runtime to the bundle and adjusting source maps accordingly. I haven't nailed it down 100%, just skimming. I experimented with a different approach, which there's a prototype of in jmm@33ec7d0. I haven't tested it extensively or tried to analyze all the possible ramifications, it's just an experiment so far. Even if it seemed like it wouldn't screw anything up I don't know if you guys want to rely on browserify internals like that. |
In order to run the transform tests as currently configured you still need access to the function that's registered with something.pipe(es6ify.configure(opts)) It's this instead: something.pipe(es6ify(browserify(), opts)) For that scenario it means you either have to test the first arg to |
Re: plugin vs transform, there'll still need to be a transform for |
This is pretty much what BC-breaking conversion to a plugin would look like right now (as discussed in, and based on, #80).
Latest: bc-breaking-plugin HEAD
The text was updated successfully, but these errors were encountered: