Skip to content
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

Support es6 based on the .es6 extension #8

Closed
phated opened this issue Dec 16, 2014 · 6 comments
Closed

Support es6 based on the .es6 extension #8

phated opened this issue Dec 16, 2014 · 6 comments

Comments

@phated
Copy link
Member

phated commented Dec 16, 2014

This can easily be done with https://6to5.org/usage.html#require-hook but it would register as .js also. Opening another issue to allow configuration objects to solve this.

This was referenced Dec 16, 2014
@silkentrance
Copy link

@phated I see where this is going to. Well, for one thing, node-interpret does not require the external modules, node-rechoir does. It will require the module, say require("6to5/register"). This in turn will return a function R, that when called will expect the user to provide a configuration object.

This function will then be passed on, as the module parameter, to whatever registration function is defined for the module '6to5/register'.

In there, you would want your configuration object to be passed to function R.

@tkellen
Copy link

tkellen commented Jan 7, 2015

@phated could you weigh in here? i don't have a problem with what @silkentrance has proposed but i'm also not going to be the one implementing es6 support (at least not for the next few weeks). @silkentrance, could you implement what you're thinking for on 6to5?

@silkentrance
Copy link

@phated, @tkellen

I have created a patch for both node-interpret and test cases for node-rechoir.

Check out vibejs/node-rechoir@8ec6edcd210b144eebc108138b19df0491256475

Please note that this version of node-rechoir expects you to pass in the requiring module, see gulpjs/rechoir#10 for more information.

@phated
Copy link
Member Author

phated commented Jan 8, 2015

@tkellen what are your thoughts on letting 6to5 register on .js if it is loaded, but only load on .es6? e.g. if your gulpfile is named gulpfile.es6 then 6to5 will be required and hook into .js and .es6 so you don't need to name all your files .es6

@tkellen
Copy link

tkellen commented Jan 9, 2015

👍

@phated phated closed this as completed in 3b0fff1 Jan 10, 2015
tkellen pushed a commit that referenced this issue Jan 10, 2015
add es6 support - closes gh-8
@phated
Copy link
Member Author

phated commented Jan 10, 2015

Added tests in rechoir for es6 - gulpjs/rechoir@e80518c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants