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

added ES6 support with babel #82

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

added ES6 support with babel #82

wants to merge 3 commits into from

Conversation

janza
Copy link

@janza janza commented Feb 25, 2015

This pull request adds support for babel transpiler for javascript.
It adds support for ES6/7 features in files with .es extension.

@sintaxi
Copy link
Owner

sintaxi commented Feb 25, 2015

oh wow, this would be nice.

Is the .es extension an existing convention?

@janza
Copy link
Author

janza commented Feb 25, 2015

I've seen it listed as supported extension in babel alogside .es6 and .js.
I think that it's better to have a separate extension for this (than to parse every .js file in the directory).

@zeke
Copy link
Contributor

zeke commented Mar 4, 2015

cool beans

@kennethormandy kennethormandy mentioned this pull request May 13, 2015
@janza
Copy link
Author

janza commented May 27, 2015

Is there a plan to merge this? Anything missing?

@kennethormandy
Copy link
Collaborator

Time to properly review it mainly :)

We haven’t forgotten about it, but it probably won’t be in the next release (which might be #94). We’d still need to write docs too.

Definitely appreciate the hard work that has gone into this, so thank you!

@janza
Copy link
Author

janza commented May 28, 2015

Awesome, thanks!

@jdcauley
Copy link

jdcauley commented Jul 3, 2015

Anything I can do to help move this along, would be very interested in this feature.

Happy to help with docs or something.

@kennethormandy
Copy link
Collaborator

I think we would need to:

  • Make sure @sintaxi wants it merged
  • Merge the Browserify stuff first Added support for Browserify #97 Ko browserify js #98 using .js as the extension instead of .es (this requires a change in Harp since .html, .css, and .js were always omitted from preprocessing before
  • Decide on an extension (.es makes sense to me, but I don’t know the Babel/ES6/ES2015/whatever conventions well)
  • Add docs, the CoffeeScript page could be used as a starting point, although those are quite sparse as well

@phated
Copy link

phated commented Jul 28, 2015

The defacto standard (because of the interpret module used by gulp/webpack/etc) is .babel.js

@kennethormandy
Copy link
Collaborator

Thanks Blaine. That makes it kind of a confusing choice since we do .[output].[input] for the asset pipeline, ex. .xml.jade. So .js.babel would actually be the “correct” choice, with Harp’s current conventions.

I supposed in this case Babel is drawing from .min.js? We could just do .babel but then I guess everyone would still have to re-name things they were porting, which kind of defeats the purpose of trying to conform to existing conventions at all.

@phated
Copy link

phated commented Jul 28, 2015

@kennethormandy I think .js.babel could work. We had a long discussion at gulpjs/gulp#830 and determined that making the extension contain which transpiler made more sense than a generic .es or .es6 extension because there is more than 1 transpiler and they handle things differently

@sintaxi
Copy link
Owner

sintaxi commented Jul 28, 2015

@jdcauley thanks for asking.

I want this in. I just want to make sure we keep CommonJS a high priority. Also, anything that works in JS ideally also works within coffeescript files. Perhaps that is less of a priority if we go with another extension such as .es.

@ir-g
Copy link

ir-g commented Nov 5, 2015

@sintaxi Is this going into the next release?

@Ore4444
Copy link

Ore4444 commented Dec 31, 2015

+1 please

@og2t
Copy link

og2t commented Feb 29, 2016

+1

@jimjkelly jimjkelly mentioned this pull request Apr 29, 2016
@danguilherme
Copy link

Manually doing a 👍 here.

@eapostol
Copy link

Anything new on this thread regarding ES6 support in Harp?

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

Successfully merging this pull request may close these issues.