Transpile ES6 modules to AMD and CommonJS with gobble and esperanto
npm install gobble-esperantoConvert ES6 modules to AMD and CommonJS with gobble and esperanto.
First, you need to have gobble installed - see the gobble readme for details. Then,
``bash`
npm i -D gobble-esperanto
gobblefile.js
`js`
var gobble = require( 'gobble' );
module.exports = gobble( 'js' ).map( 'esperanto', options );
The options object can have the following properties:
* type (string) - 'amd', 'cjs' or 'umd'. Default to 'amd'name
* (string) - name to use for UMD exports (required if type is umd)useFilename
* (boolean) - if name is not supplied for UMD exports and this is true, the UMD name will be set to the filename without the extensionstrict
* (boolean) - whether to use strict modesourceMap
* (true or 'inline'`) - whether to create a sourcemap
MIT. Copyright 2014 Rich Harris