Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yup. 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!)



Is 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.


Sure --- it's a mess, though.

https://github.com/davidgiven/gruntle/blob/gruntle/build.nin...

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.


Thanks. Could I get away without the Lua?


Yes, 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.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: