-
Notifications
You must be signed in to change notification settings - Fork 75
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
Consider authoring in ES6 #42
Comments
Cool, thanks I will check this iut —@tjmehta On Tue, Jan 6, 2015 at 7:46 AM, Tomek Wiszniewski
|
One more thought. Reading that
– maybe we could branch out an experimental 2.0.x branch, tailored to ES6? Without the cruft which already comes bundled in ES6 (like This could be used as it is in ES6 projects, and optionally compiled to ES5. 6to5 does a great job with that. If you're interested, you can have a look at tomekwi/mithril-n – I've managed to polish my ES6 workflow for testing and compilation. |
I am still unsure about all this ES6 stuff. It seems you guys have a lot more experience that me about all the options. When you two (@tomekwi, @stoeffel) have been using using es6 I am assuming you are probably transpiling your code (for browser usage) or using node with flags. In both of these cases, how are you importing other npm modules? |
I'm often using 6to5(now babel) with a pretty straightforward workflow.
You can reguire modules like this I can create a simple proposal if you like? |
I just saw what you proposed in #62. Make sense, but I think you may have misunderstood my question. My main question is: I don't think I'd want to start implementing 101 in ES6 until it is widely supported (and wouldn't require transpiling to ES5). Reasons include: mainstream readability, easier for contributors, avoid transpiling, avoid doubling size of source, etc. Thoughts? |
No you just import it.
I think then we shouldn't move to es6. But I think there is no down side to transpiling, a lot of libraries are doing it and developers are getting more and more used to it. IMHO es6 code is often easier to read. If we add a CONTRIBUTING.md contributors know where they should change things.
es6 files can be excluded from npm. |
@tjmehta, what @stoeffel says is true when working with babel. All ES6 modules are simply transpiled and run as ES5 – whether in node or in the browser (via webpack or browserify). So But, as a matter of fact, ES6 specs say nothing about supporting CommonJS or AMD. However: when an implementation of modules comes to node, I'm 100% sure they'll work out of the box with CJS – otherwise the whole ecosystem of npm would become useless. For browsers we'll need some kind of a workaround to marry modules and CJS – but today we need workarounds for that just as well. |
Working with babel is pure pleasure :) But I must admit I had a hard time in a project compiled with traceur. In order to use 101 I had to fork, "transpile" all of 101's functions to ES6 – and watch out not to use those, which pull in CommonJS modules. So I think an ES6 version would already improve accessibility. And after all, it's a step which will need to be taken sooner or later :) |
I'm not sure I'd do that @stoeffel. There are people who'll want to pull the ES6 version directly – for example to avoid doubling some of babel's runtime code in webpacked code. |
Okay, didn't know that. Thx |
💯 👍 |
I am punting on this for now. I know ES6 traction is picking up fast. Let's revisit this idea after a few months. Long answer here: #62 |
Reopening this for discussion. |
@tjmehta using babel presets, such as |
I am thinking about making a breaking change to 101 in early 2016 to assume es6 as the widely supported JavaScript. Optimally I would like to support es5 and es6, but only use transpiled code for es5 environments. Typed using my thumbs..
|
moving es6 convo to #150 |
It's another idea than #38. Author in ES6, transpile to a universal module format for node, AMD and the browser.
The original idea came from Ryan Florence some time ago. I've followed his advice in tomekwi/as.js. The technology is still quite rough, but everything seems work smoothly.
The text was updated successfully, but these errors were encountered: