terraform
terraform copied to clipboard
added ES6 support with babel
This pull request adds support for babel transpiler for javascript. It adds support for ES6/7 features in files with .es extension.
oh wow, this would be nice.
Is the .es extension an existing convention?
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).
cool beans
Is there a plan to merge this? Anything missing?
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!
Awesome, thanks!
Anything I can do to help move this along, would be very interested in this feature.
Happy to help with docs or something.
I think we would need to:
- [ ] Make sure @sintaxi wants it merged
- [ ] Merge the Browserify stuff first #97 #98 using
.jsas the extension instead of.es(this requires a change in Harp since.html,.css, and.jswere always omitted from preprocessing before - [ ] Decide on an extension (
.esmakes 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
The defacto standard (because of the interpret module used by gulp/webpack/etc) is .babel.js
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.
@kennethormandy I think .js.babel could work. We had a long discussion at https://github.com/gulpjs/gulp/issues/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
@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.
@sintaxi Is this going into the next release?
+1 please
+1
Manually doing a :+1: here.
Anything new on this thread regarding ES6 support in Harp?