-
-
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
Add support for subarg to allow passing file extension #65
base: master
Are you sure you want to change the base?
Conversation
I want to use es6ify as a transform with browserify-rails. So do some other people: browserify-rails/browserify-rails#19 I asked about subargs here and there was some confusion: This PR adds support for subargs or passing the file extension via the command line. Another transform that has this pattern is hbsfy and browserify expects transforms to take arguments in this way:
|
I fixed the test so it passes on CircleCI. I also forked to: https://www.npmjs.com/package/es6ify-with-subarg Seems silly to fork over such a small thing but this is blocking any chance of using it on my project and well, I want to use it. Looking forward to hopefully deleting the fork! |
I'm sorry you had to create a fork cause we are too slow to get this in. We just need to consolidate this and come up with a good API to finally get this feature added and published. @guzart @domenic what do you think of the implementation suggested in this PR? Is this close to what we intended to do as well? |
@thlorenz Not a problem -- I only mentioned I forked it to take the pressure off (I noticed another PR seems to be in a similar area). I'd like to kill the fork ASAP but in the meantime it lets the team I'm on evaluate using it. |
@cymen makes perfect sense I'm gonna be out of action also called vacation without a computer pretty soon, but hopefully either of the other two contributors can help get this feature in soon. |
Adding opts seems like a good idea but I don't like the extension option very much. Haven't thought too hard about it though. |
Browserify supports passing arguments to transforms via subarg. This
commit adds support for that so we can use es6ify on the command line
like so:
browserify -t [es6ify --extension=.js.es6] input.js