5 ms·
Most of that is so people can use the slightly nicer syntax of the newer version of JavaScript in a more supported way as it's transpired. Honestly I'm not a fa
by BinaryIdiot 11y ago
Most of that is so people can use the slightly nicer syntax of the newer version of JavaScript in a more supported way as it's transpired. Honestly I'm not a fan because, as you can see, it's a big ass bucket of extra complexity for some extra, albeit nice, syntax updates.
I'm waiting for wide support of ECMAScript 6 before I start using it widely. Though I feel I'm a bit in the minority here I just don't want to deal with all of the transpiling complexities if I don't need to.
- abecedarius 11y agoI've started using ES6 sans 'transpiler' for web development on Chrome. There's still the build step for release to other browsers, but so far I haven't bothered. (I think your decision is completely reasonable; only pointing out that since just this month, with Chrome 49 out, you can develop without any build step.)
- david-given 11y agoYup. I'm working on a Polymer project in ES6. I develop in Chrome with it pointing directly at my source, so I get a full debugger and quick reloads by hitting the F5 button. Then I use crisper/babel/vulcanise via a ninja build script to generate an ES5 deployment package for the other browsers. It works really well. (ES6 is so, so much nicer than ES5. It's almost like a real language now!)
- voltagex_ 11y agoIs there anything you can share of that ninja script? I've been looking at it as a replacement for environments where grunt doesn't work too well.
- david-given 11y agoSure --- it's a mess, though. https://github.com/davidgiven/gruntle/blob/gruntle/build.ninja https://github.com/davidgiven/gruntle/blob/gruntle/build.nin... https://github.com/davidgiven/gruntle/blob/gruntle/build https://github.com/davidgiven/gruntle/blob/gruntle/build build is a tiny Lua preprocessor which expands templates in build.ninja. It needs a cleanup but it works, it's way faster than gulp, and is much easier to debug. Haven't touched grunt so I don't know how it compares there.
- voltagex_ 11y agoThanks. Could I get away without the Lua?
- david-given 11y agoYes, but you'd need to expand the source file rules inline --- I added the Lua because I was fed up with doing it by hand. (Ninja doesn't have implicit rules.)
- deleted 11y ago[deleted]
- bzbarsky 11y agoNote that other browsers (specifically Firefox and Edge) generally have better ES6 support than Chrome does, so a "build step" is not needed for them unless you happen to be using one of the very few things that Chrome supports and they do not.