News for hackers. Stuff that matters.
Re:Fly.js: New generation build system by _greim_ on Tuesday June 30, 2015 @10:17PM (#9809696)
I'm glad people are pushing the envelope on JS build tooling, and not giving in to the "we need to freeze the toolspace now" contingent. I feel like the mainstream build tools have been interesting, but nobody has got it all figured out yet.

One question, if this is ES6, then why:

    exports.foo = function* () {}
...instead of:

    export function* foo() {}

?
Re:Fly.js: New generation build system by robinricard on Wednesday July 01, 2015 @03:28AM (#9810434)
The first snippet uses the CommonJS [1] standard (a way to import packages into a JS file that is used by Node, webpack or browserify for example).

The second snippet uses ES6 modules [2]. Babel actually transpiles those ES6 modules into CommonJS modules when used in a Node.js environment (which is the case with a build tool).

Since even IO.js doesn't support ES6 modules for now and you're likely to use a build tool in order to use babel, you shouldn't use ES6 modules in a build file.

[1]: http://www.commonjs.org/ [2]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re:Fly.js: New generation build system by kevrom on Tuesday June 30, 2015 @11:50PM (#9809977)
Doing the latter would require you to use something like babel-node, whereas the former is all available without any such wrapper/compiling.
Re:Fly.js: New generation build system by bucaran on Thursday July 02, 2015 @01:27AM (#9817009)
The folks below already gave you the answer, but we are considering adding support for Flyfiles written in ES6 now. It's intrusive and opinionated, and although one of the reasons I like auto loading plugins is so that Flyfiles end up looking as agnostic as possible despite using ES5, I think it would be awesome to have ES6 Flyfiles.