Open IjzerenHein opened 9 years ago
Esperanto doesn't support it, so grunt-esperanto doesn't. I would recommend looking at Babel, with Browserify or WebPack if you're looking to compile your modules into a bundle.
It doesn't? I was referring to the esperanto.bundle
command, which you can use like this:
var fs = require( 'fs' );
var esperanto = require( 'esperanto' );
esperanto.bundle({
base: 'src', // optional, defaults to current dir
entry: 'mean.js' // the '.js' is optional
}).then( function ( bundle ) {
var cjs = bundle.toCjs();
fs.writeFile( 'dist/mean.js', cjs.code );
});
https://github.com/esperantojs/esperanto/wiki/Bundling-multiple-ES6-modules
Oh wow, that's a feature that wasn't offered when I wrote this, and actually something I have a pretty strong need for...
I'm not sure when I would have time to get this added though, since I've already migrated all my projects to Babel. Would happily help debug and review and all that, though.
I'll see what I can do. I don't have an immediate need for it either, as I've included a separate script for esperanto to address this in my project. Though, I would be nice if I could use it directly from my grunt toolchain. Cheers
Hi, I was wondering, is there support for bundling in grunt-esperanto? If so, I'd really love to see that feature. cheers!