[
  {
    "path": ".babelrc",
    "content": "{\n\t\"whitelist\": [\n\t\t\"es3.memberExpressionLiterals\",\n\t\t\"es3.propertyLiterals\",\n\t\t\"es6.arrowFunctions\",\n\t\t\"es6.blockScoping\",\n\t\t\"es6.constants\",\n\t\t\"es6.destructuring\",\n\t\t\"es6.parameters\",\n\t\t\"es6.properties.shorthand\",\n\t\t\"es6.templateLiterals\",\n\t\t\"es6.classes\"\n\t],\n\t\"loose\": [\n\t\t\"es6.classes\",\n\t\t\"es6.destructuring\"\n\t]\n}\n"
  },
  {
    "path": ".editorconfig",
    "content": "[*.js]\nindent_style = tab"
  },
  {
    "path": ".gitignore",
    "content": ".DS_Store\nnode_modules\nsample/output\n.gobble\n.gobble-build\nout\ndemo/dist\ntest/lib\nlib\ncli-test\nsandbox\ndist\n"
  },
  {
    "path": ".jshintrc",
    "content": "{\n\t\"esnext\": true,\n\t\"undef\": true,\n\t\"unused\": true,\n\t\"expr\": true,\n\t\"boss\": true,\n\t\"globals\": {\n\t\t\"process\": true,\n\t\t\"__dirname\": true,\n\t\t\"module\": true,\n\t\t\"exports\": true,\n\t\t\"require\": true,\n\t\t\"console\": true,\n\t\t\"define\": true\n\t}\n}\n"
  },
  {
    "path": ".travis.yml",
    "content": "sudo: false\nlanguage: node_js\nnode_js:\n  - \"0.10\"\n  - \"0.11\"\n  - \"0.12\"\nenv:\n  global:\n    - BUILD_TIMEOUT=10000\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# changelog\n\n## 0.7.6\n\n* Update sander to prevent graceful-fs-opocalypse ([#193](https://github.com/esperantojs/esperanto/issues/193))\n\n## 0.7.5\n\n* Add a deprecation warning. (This project is deprecated – for one-to-one transformations you should use [Babel](https://babeljs.io/), for bundling you should use [Rollup](https://github.com/rollup/rollup).)\n\n## 0.7.3\n\n* `this` at the top-level is no longer treated as a syntax error ([#151](https://github.com/esperantojs/esperanto/issues/151))\n\n## 0.7.2\n\n* Fix two bugs with renamed exports ([#170](https://github.com/esperantojs/esperanto/issues/170))\n\n## 0.7.1\n\n* Fix `export { x as y }` namespace imports within a bundle ([#169](https://github.com/esperantojs/esperanto/issues/169))\n* Lock magic-string version to 0.4.9 pending investigation of bug\n\n## 0.7.0\n\n* Where possible, default exports are not renamed ([#166](https://github.com/esperantojs/esperanto/issues/166))\n* Some internal tidying up\n\n## 0.6.34\n\n* Improve module sorting algorithm to handle tricky cyclical cases ([#159](https://github.com/esperantojs/esperanto/issues/159))\n\n## 0.6.33\n\n* Fix a separate 0.6.31 regression with external modules ([#158](https://github.com/esperantojs/esperanto/issues/158))\n\n## 0.6.32\n\n* Fix regression introduce in 0.6.31, whereby modules within a bundle are prevented from depending on the entry module\n\n## 0.6.31\n\n* Preserve trailing `.js` in external module names (e.g. [highlight.js](https://www.npmjs.com/package/highlight.js)) ([#155](https://github.com/esperantojs/esperanto/issues/155))\n* Fix naming bug with modules imported via both `resolvePath` and normal import ([#156](https://github.com/esperantojs/esperanto/issues/156))\n\n## 0.6.30\n\n* Mutually dependent modules within a bundle are re-ordered based on whether one is referenced at the top level of the other ([#152](https://github.com/esperantojs/esperanto/issues/152))\n\n## 0.6.29\n\n* Relative source URLs in sourcemaps are correct\n* `src` directory included in npm package\n\n## 0.6.28\n\n* `resolvePath` option is not required to return a path (e.g. `esperanto.toAmd({ code, ast })`) ([#148](https://github.com/esperantojs/esperanto/issues/148))\n\n## 0.6.27\n\n* AST can be supplied when doing one-to-one transformations (e.g. `esperanto.toAmd({ code, ast })`) ([#140](https://github.com/esperantojs/esperanto/issues/140))\n* Modules can be supplied directly when bundling, rather than reading from disk ([docs here](https://github.com/esperantojs/esperanto/wiki/Bundling-multiple-ES6-modules#modules)) ([#140](https://github.com/esperantojs/esperanto/issues/140))\n* 'use strict' pragma is omitted if `useStrict: false` option is supplied ([#141](https://github.com/esperantojs/esperanto/issues/141))\n\n## 0.6.26\n\n* AST walker handles sparse arrays ([#144](https://github.com/esperantojs/esperanto/issues/144))\n\n## 0.6.25\n\n* Reliable updating of exported expressions ([#142](https://github.com/esperantojs/esperanto/issues/142))\n\n## 0.6.24\n\n* Renamed exports (`export { foo as bar }`) works\n* Internal tidy up/refactoring, resulting in smaller library\n\n## 0.6.23\n\n* Function arguments are considered when naming imports to avoid conflicts ([#119](https://github.com/esperantojs/esperanto/issues/119))\n* Bindings are always exported at the end of a module, regardless of re-assignments ([#130](https://github.com/esperantojs/esperanto/issues/130))\n* Generated import names cannot be shadowed by non-root-scope declarations ([#133](https://github.com/esperantojs/esperanto/issues/133))\n\n## 0.6.22\n\n* Allow imports to be re-exported ([#124](https://github.com/esperantojs/esperanto/issues/124))\n\n## 0.6.21\n\n* Fix npm versioning snafu\n\n## 0.6.20\n\n* Replaced estraverse with internal utility that doesn't depend on hardcoded node types to traverse AST ([#129](https://github.com/esperantojs/esperanto/issues/129))\n\n## 0.6.19\n\n* Sourcemap comments are removed from bundles as well as one-to-one transformations ([#120](https://github.com/esperantojs/esperanto/issues/120))\n\n## 0.6.18\n\n* Upgrade to acorn v1.x ([#125](https://github.com/esperantojs/esperanto/issues/125))\n* Sourcemap comments from prior transformations are removed ([#120](https://github.com/esperantojs/esperanto/issues/120))\n* Named function expressions are not erroneously renamed ([#122](https://github.com/esperantojs/esperanto/issues/122))\n\n## 0.6.17\n\n* Sourcemap mappings are set explicitly - rather than mapping every single character, the locations from the acorn AST are used. As well as smaller sourcemaps, this results in modest performance improvements internally, and large performance improvements for external tools that work with the sourcemap\n\n## 0.6.16\n\n* Prevent import naming collisions ([#116](https://github.com/esperantojs/esperanto/issues/116))\n* Throw error on duplicate imports ([#95](https://github.com/esperantojs/esperanto/issues/95))\n* Prevent internal assigment exports clashing within a bundle ([#117](https://github.com/esperantojs/esperanto/issues/117))\n* Update chalk to 1.0.0\n\n## 0.6.15\n\n* Clashes with names for external dependencies are avoided ([#114](https://github.com/esperantojs/esperanto/issues/114))\n\n## 0.6.14\n\n* The `sourceMapFile` requirement is waived when `options.sourceMap === 'inline'` ([#105](https://github.com/esperantojs/esperanto/issues/105))\n\n## 0.6.13\n\n* Windows fixes\n\n## 0.6.12\n\n* Bundled external modules are deduplicated in the rare case that they import themselves ([#103](https://github.com/esperantojs/esperanto/issues/103))\n\n## 0.6.11\n\n* Use robust `module.relativePath` internally rather than `module.file` - necessary for bundled external modules with dependencies of their own\n* Browser-flavoured version of Esperanto (`dist/esperanto.browser.js`) bundles ES6 dependencies (`magic-string` and its `vlq` dependency), as both a convenience and a form of dogfooding\n\n## 0.6.10\n\n* The `resolvePath` option can be used with `esperanto.bundle()` to locate modules, if they do not exist relative to `base`. It should return an absolute path as a string, or a promise that resolves to one ([#68](https://github.com/esperantojs/esperanto/issues/68))\n\n## 0.6.9\n\n* `sourceMapFile` can be an absolute path, in which case it is left unchanged ([#101](https://github.com/esperantojs/esperanto/issues/101))\n\n## 0.6.8\n\n* Module load order is guaranteed by import order - empty imports are represented by `__dep0__` etc within the module, or `undefined` globally ([#92](https://github.com/esperantojs/esperanto/issues/92))\n* Fix absolute path resolution in cases like `./../foo` ([#97](https://github.com/esperantojs/esperanto/issues/97))\n* If `bundle.concat()` fails due to external dependencies, or exports from the entry module, the error message lists them\n\n## 0.6.7\n\n* Using the `_evilES3SafeReExports` will cause re-exported bindings to be done with direct property assignment rather than `Object.defineProperty()`. In most cases, the resulting behaviour will be no different, but it could result in undefined bindings in cases of cyclical dependencies, and values are fixed at the time of re-export rather than live.\n\n## 0.6.6\n\n* Conflicts between module names and unscoped (i.e. global) names and `exports` are prevented ([#74](https://github.com/esperantojs/esperanto/issues/74)), ([#79](https://github.com/esperantojs/esperanto/issues/79))\n* Names in function expressions (as opposed to declarations) are disregarded ([#73](https://github.com/esperantojs/esperanto/issues/73))\n* Re-exports remain enumerable\n* Continuous integration via Travis-CI\n\n## 0.6.5\n\n* Relative AMD dependency paths can be made absolute with `absolutePaths: true` - requires `amdName` to be specified ([#58](https://github.com/esperantojs/esperanto/issues/58))\n* Within a bundle, built-in names like `Math` and `Promise` are avoided ([#70](https://github.com/esperantojs/esperanto/issues/70))\n* Bundle imports and exports are reported as `bundle.imports` and `bundle.exports` ([#59](https://github.com/esperantojs/esperanto/issues/59))\n\n## 0.6.4\n\n* Fixes duplicate import bug ([#63](https://github.com/esperantojs/esperanto/issues/63))\n* Module names are correctly escaped ([#50](https://github.com/esperantojs/esperanto/issues/50))\n* Accessing properties on top-level `this` throws error at parse time\n* CLI: if no `--output` option is given, bundle is written to stdout (if no separate sourcemap) ([#60](https://github.com/esperantojs/esperanto/issues/60))\n* CLI: Better errors ([#66](https://github.com/esperantojs/esperanto/issues/66))\n* Test suite refactor\n\n## 0.6.3\n\n* Support for Windows file paths\n* `bundle.concat()` can be called without an options argument\n* Options argument passed to `bundle.concat()` can include `intro`, `outro`, `indent` properties which will override defaults (`indent: true` is equivalent to 'automatic', otherwise pass a string)\n* Bundle transform function can return an empty string\n\n## 0.6.2\n\n* Implement `bundle.concat()` for self-contained bundles ([#48](https://github.com/esperantojs/esperanto/issues/48))\n\n## 0.6.1\n\n* Fix for ([#45](https://github.com/esperantojs/esperanto/issues/45))\n* External modules only have `__default` appended where necessary ([#46](https://github.com/esperantojs/esperanto/issues/46))\n\n## 0.6.0\n\n* UMD export detects CJS environment *before* AMD ([#42](https://github.com/esperantojs/esperanto/issues/42))\n* `this` at module top-level is replaced with `undefined`, as per the spec ([#43](https://github.com/esperantojs/esperanto/issues/43))\n* More compact CommonJS export\n* Bundler transform function receives path as second argument\n\n## 0.5.10\n\n* One-to-one conversions get the same compact UMD form as bundles\n* Default imports are not hedged unnecessarily ([#40](https://github.com/esperantojs/esperanto/issues/40))\n\n## 0.5.9\n\n* More concise UMD output ([#36](https://github.com/esperantojs/esperanto/issues/36))\n\n## 0.5.8\n\n* Functions are always exported early ([#37](https://github.com/esperantojs/esperanto/issues/37))\n* Modules can be transformed before bundling with `esperanto.bundle({ transform: someFunction })`, where `someFunction` returns either a string, or a promise that resolves to a string\n\n## 0.5.7\n\n* Classes are exported after declaration, not before ([#33](https://github.com/esperantojs/esperanto/issues/33))\n\n## 0.5.6\n\n* Support for named AMD modules, via `amdName` option (works for both standalone and bundle conversions)\n\n## 0.5.5\n\n* No actual changes - just shuffling things about so we can separate demo page into separate repo\n\n## 0.5.4\n\n* Performance improvements and internal refactoring\n\n## 0.5.3\n\n* You can specify a `banner` and/or `footer` option when converting or bundling\n* An error will be thrown if a module attempts to import itself\n\n## 0.5.2\n\n* Imported objects (other than namespace imports) can be assigned properties ([#29](https://github.com/esperantojs/esperanto/issues/29))\n* Default imports can be exported as named exports from the entry module in a bundle\n\n## 0.5.1\n\n* Identifiers that match object prototype properties are not mistakenly exported (and garbled)\n\n## 0.5.0\n\n* Chained imports/exports are renamed correctly within a bundle ([#17](https://github.com/esperantojs/esperanto/issues/17))\n* Bundle exports are written at assignment time, rather than at the end of the bundle with an `Object.defineProperty` hack\n* Attempting to import a non-exported identifier within the same bundle throws an error\n* External modules are imported correctly ([#28](https://github.com/esperantojs/esperanto/issues/28))\n* Identifiers are only rewritten as necessary ([#25](https://github.com/esperantojs/esperanto/issues/25))\n* Redundant assignments in a bundle (`mod__default = mod__foo`) are avoided ([#14](https://github.com/esperantojs/esperanto/issues/14))\n* Shadowed imports are handled ([#18](https://github.com/esperantojs/esperanto/issues/18))\n* Modules are indented consistently within a bundle\n\n## 0.4.10\n\n* Update acorn (greater ES6 coverage) and estraverse dependencies - thanks [@leebyron](https://github.com/leebyron)\n\n## 0.4.9\n\n* Adds `class` support - thanks [@leebyron](https://github.com/leebyron)\n* Use `hasOwnProperty` check to prevent garbled output - thanks [@leebyron](https://github.com/leebyron)\n\n## 0.4.8\n\n* `exports['default']` is used in favour of `exports.default`, for the benefit of IE8 - thanks [@evs-chris](https://github.com/evs-chris/)\n\n## 0.4.7\n\n* In standalone conversions, import names are inferred from the source code where possible (batch/default imports), and will avoid naming collisions ([#15](https://github.com/esperantojs/esperanto/issues/15))\n\n## 0.4.6\n\n* Fix missing closing parenthesis on strict mode UMD output\n\n## 0.4.5\n\n* Only print `defaultOnly` deprecation warning once, rather than flooding the console\n\n## 0.4.4\n\n* Parse errors (from acorn) are augmented with file info when bundling\n\n## 0.4.3\n\n* Added CLI files to npm package (oops!)\n\n## 0.4.2\n\n* Sourcemap support for bundles\n\n## 0.4.1\n\n* Command line interface\n* Sourcemap support for one-to-one conversions\n* Neater UMD exports\n* Remove `addUseStrict` option (ES6 modules are always in strict mode)\n\n## 0.4.0\n\n* Started maintaining a changelog\n* Complete rewrite!\n* Spec-compliance - Esperanto now supports bindings and cycles (only in [strict mode](https://github.com/Rich-Harris/esperanto/wiki/strictMode))\n* The `defaultOnly` option has been deprecated - esperanto's standard behaviour is now to import and exports defaults. If you want to use named imports/exports, pass `strict: true` (this basically means that your default export becomes `exports.default` rather than `module.exports`). For more information see the [wiki page on strict mode](https://github.com/Rich-Harris/esperanto/wiki/strictMode)\n* UMD output: `esperanto.toUmd(es6source, {name:'myModule'});\n* Bundling - see the [wiki page on esperanto.bundle()](https://github.com/Rich-Harris/esperanto/wiki/esperanto-bundle)\n"
  },
  {
    "path": "README.md",
    "content": "# esperanto [![Build Status](https://travis-ci.org/esperantojs/esperanto.svg?branch=master)](https://travis-ci.org/esperantojs/esperanto)\n\n## This project is no longer under active development. To bundle ES6 modules, use [Rollup](https://github.com/rollup/rollup). To convert ES6 modules to another format, use [Babel](https://babeljs.io/docs/usage/modules/). See [#191](https://github.com/esperantojs/esperanto/pull/191) for details.\n\nA better way to transpile ES6 modules to AMD and CommonJS:\n\n* Easier - no laborious configuration\n* Simpler - doesn't make dangerous assumptions about your project setup\n* Smarter - non-destructive source code transformation, no runtime Traceur dependency, and no ES5-only features\n* Faster - roughly 10x quicker than the alternatives\n\nTry it online here: [esperantojs.org](http://esperantojs.org)\n\n## Installation\n\nInstall esperanto from npm:\n\n```bash\nnpm install esperanto\n```\n\n## Usage\n\nYou can use Esperanto in one of two modes:\n\n* [Converting a single module](https://github.com/esperantojs/esperanto/wiki/Converting-a-single-module)\n* [Bundling multiple ES6 modules](https://github.com/esperantojs/esperanto/wiki/Bundling-multiple-ES6-modules)\n\n\n## Why not use existing module transpilers?\n\nSee [comparisons with other tools](https://github.com/esperantojs/esperanto/wiki/Comparisons-with-other-tools) for some of the reasons to use Esperanto.\n\n\n## Credits\n\nMany thanks to [Marijn Haverbeke](http://marijnhaverbeke.nl/) for [Acorn](https://github.com/marijnh/acorn), which does all the heavy lifting.\n\n\n## License\n\nCopyright 2014 Rich Harris. MIT Licensed.\n"
  },
  {
    "path": "appveyor.yml",
    "content": "# Test against this version of Node.js\nenvironment:\n  matrix:\n  # node.js\n  - nodejs_version: \"0.10\"\n  - nodejs_version: \"0.12\"\n  # io.js\n  - nodejs_version: \"1.0\"\n\n# Install scripts. (runs after repo cloning)\ninstall:\n  # Get the latest stable version of Node.js or io.js\n  - ps: Install-Product node $env:nodejs_version\n  # install modules\n  - npm install\n\n# Post-install test scripts.\ntest_script:\n  # Output useful info for debugging.\n  - node --version\n  - npm --version\n  # run tests\n  - npm test\n\n# Don't actually build.\nbuild: off\n"
  },
  {
    "path": "bin/handleError.js",
    "content": "var chalk = require( 'chalk' );\n\nvar handlers = {\n\tMISSING_INPUT_OPTION: function () {\n\t\tconsole.error( chalk.red( 'You must specify an --input (-i) option when bundling' ) );\n\t},\n\n\tMISSING_OUTPUT_OPTION: function () {\n\t\tconsole.error( chalk.red( 'You must specify an --output (-o) directory option when converting a directory of files' ) );\n\t},\n\n\tNO_INPUT_DETECTED: function () {\n\t\tconsole.error( chalk.red( 'No input detected! Try using the --input (-i) option' ) );\n\t},\n\n\tMISSING_NAME: function ( err ) {\n\t\tconsole.error( chalk.red( 'You must supply a name for UMD exports (e.g. `--name myModule`)' ) );\n\t}\n};\n\nmodule.exports = function handleError ( err ) {\n\tvar handler;\n\n\tif ( handler = handlers[ err && err.code ] ) {\n\t\thandler( err );\n\t} else {\n\t\tconsole.error( chalk.red( err.message || err ) );\n\n\t\tif ( err.stack ) {\n\t\t\tconsole.error( chalk.grey( err.stack ) );\n\t\t}\n\t}\n\n\tconsole.error( 'Type ' + chalk.cyan( 'esperanto --help' ) + ' for help, or visit https://github.com/esperantojs/esperanto/wiki' );\n\n\tprocess.exit( 1 );\n};\n"
  },
  {
    "path": "bin/help.md",
    "content": "  Esperanto version <%= version %>\n  =====================================\n\n  Usage: esperanto [options]\n\n  Basic options:\n\n    -v, --version            Show version number\n    -h, --help               Show this help message\n    -i, --input              Input file (if absent, reads from stdin)\n    -o, --output <output>    Output file (if absent, prints to stdout)\n    -t, --type [amd]         Type of output (amd, cjs, umd)\n    -s, --strict             Use strict mode\n    -b, --bundle             Create a bundle including <file>'s dependencies\n    -n, --name               Name for UMD export\n    -a, --amdName            Name for AMD module (default is anonymous)\n    -m, --sourcemap          Generate sourcemap (`-m inline` for inline map)\n\n  Additional options when bundling\n\n    -d, --basedir=<basedir>  Base directory for module resolution\n    -k, --skip=<files...>    Comma-separated list of files to skip (relative to basedir)\n\n\n  Example:\n\n    esperanto --type=cjs --output=build/app.js --bundle -- src/app.js\n\n\n  Notes:\n\n    * You must supply an --input option when bundling (i.e. no piping from stdin)\n    * Non-inline sourcemaps will be discarded when piping to stdout\n\n  For more information visit https://github.com/Rich-Harris/esperanto/wiki\n"
  },
  {
    "path": "bin/index.js",
    "content": "#!/usr/bin/env node\n\nvar minimist = require( 'minimist' ),\n\tcommand;\n\ncommand = minimist( process.argv.slice( 2 ), {\n\talias: {\n\t\ti: 'input',\n\t\to: 'output',\n\t\tv: 'version',\n\t\th: 'help',\n\t\tb: 'bundle',\n\t\ts: 'strict',\n\t\tt: 'type',\n\t\tm: 'sourcemap',\n\t\tn: 'name',\n\t\td: 'basedir',\n\t\tk: 'skip',\n\t\ta: 'amdName'\n\t}\n});\n\nif ( command.help || ( process.argv.length <= 2 && process.stdin.isTTY ) ) {\n\trequire( './showHelp' )();\n}\n\nelse if ( command.version ) {\n\tconsole.log( 'Esperanto version ' + require( '../package.json' ).version );\n}\n\nelse {\n\trequire( './runEsperanto' )( command );\n}"
  },
  {
    "path": "bin/runEsperanto.js",
    "content": "var path = require( 'path' ),\n\tsander = require( 'sander' ),\n\tPromise = sander.Promise,\n\thandleError = require( './handleError' ),\n\tesperanto = require( '../' );\n\nvar methods = {\n\tamd: 'toAmd',\n\tcjs: 'toCjs',\n\tumd: 'toUmd'\n};\n\nmodule.exports = function ( options ) {\n\tvar method;\n\n\tif ( options.type && !methods[ options.type ] ) {\n\t\tconsole.error( 'The --type (-t) option must be one of amd, cjs, umd' );\n\t\tprocess.exit( 1 );\n\t}\n\n\tmethod = methods[ options.type ] || 'toAmd';\n\n\ttry {\n\t\tif ( options.bundle ) {\n\t\t\tbundle( options, method ).catch( handleError );\n\t\t} else {\n\t\t\tconvert( options, method ).catch( handleError );\n\t\t}\n\t} catch ( err ) {\n\t\thandleError( err );\n\t}\n};\n\nfunction bundle ( options, method ) {\n\tvar bundleOptions, file;\n\n\tif ( !options.input ) {\n\t\thandleError({ code: 'MISSING_INPUT_OPTION' });\n\t}\n\n\tbundleOptions = {\n\t\tbase: path.resolve( options.basedir || '' )\n\t};\n\n\tif ( options.skip ) {\n\t\tbundleOptions.skip = options.skip.split( ',' ).map( function ( file ) {\n\t\t\treturn file.replace( /\\.js$/, '' );\n\t\t});\n\t}\n\n\t// entry should be relative to base\n\tif ( options.basedir && !sander.existsSync( path.join( bundleOptions.base, options.input ) ) ) {\n\t\t// file doesn't exist relative to base...\n\t\tfile = path.resolve( options.input ).replace( bundleOptions.base + '/', '' );\n\t} else {\n\t\tfile = path.resolve( bundleOptions.base, options.input );\n\t}\n\n\tbundleOptions.entry = file;\n\n\treturn esperanto.bundle( bundleOptions ).then( function ( bundle ) {\n\t\tvar transpiled, promises;\n\n\t\ttranspiled = bundle[ method ]({\n\t\t\tname: options.name,\n\t\t\tamdName: options.amdName,\n\t\t\tstrict: options.strict,\n\t\t\tsourceMap: options.sourcemap,\n\t\t\tsourceMapFile: options.sourcemap ? path.resolve( options.output ) : null\n\t\t});\n\n\t\tif ( options.output ) {\n\t\t\tpromises = [ sander.writeFile( options.output, transpiled.code ) ];\n\n\t\t\tif ( options.sourcemap === true ) {\n\t\t\t\tpromises.push( sander.writeFile( options.output + '.map', transpiled.map ) );\n\t\t\t}\n\n\t\t\treturn Promise.all( promises );\n\t\t} else {\n\t\t\tprocess.stdout.write( transpiled.code );\n\t\t}\n\t});\n}\n\nfunction convert ( options, method ) {\n\tif ( options.input ) {\n\t\treturn sander.stat( options.input ).then( function ( stats ) {\n\t\t\tif ( stats.isDirectory() ) {\n\t\t\t\tif ( !options.output ) {\n\t\t\t\t\thandleError({ code: 'MISSING_OUTPUT_OPTION' });\n\t\t\t\t}\n\n\t\t\t\t// transpile all the things\n\t\t\t\treturn sander.lsr( options.input )\n\t\t\t\t\t.then( filterOutNonJs )\n\t\t\t\t\t.then( function ( files ) {\n\t\t\t\t\t\tvar promises = files.map( function ( file ) {\n\t\t\t\t\t\t\tvar input = path.join( options.input, file );\n\t\t\t\t\t\t\tvar output = path.join( options.output, file );\n\n\t\t\t\t\t\t\tvar fileOptions = assign( {}, options, {\n\t\t\t\t\t\t\t\tinput: input,\n\t\t\t\t\t\t\t\toutput: output,\n\t\t\t\t\t\t\t\tsourceMapSource: input,\n\t\t\t\t\t\t\t\tsourceMapFile: output\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\treturn convert( fileOptions, method );\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn Promise.all( promises );\n\t\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn sander.readFile( options.input )\n\t\t\t\t.then( String )\n\t\t\t\t.then( run );\n\t\t});\n\t} else {\n\t\treturn readFromStdin().then( run );\n\t}\n\n\tfunction run ( source ) {\n\t\tvar transpiled, promises;\n\n\t\ttranspiled = esperanto[ method ]( source, {\n\t\t\tstrict: options.strict,\n\t\t\tname: options.name,\n\t\t\tamdName: options.amdName,\n\t\t\tsourceMap: options.sourcemap,\n\t\t\tsourceMapSource: options.input,\n\t\t\tsourceMapFile: options.output\n\t\t});\n\n\t\tif ( options.output ) {\n\t\t\tpromises = [ sander.writeFile( options.output, transpiled.code ) ];\n\n\t\t\tif ( options.sourcemap === true ) {\n\t\t\t\tpromises.push( sander.writeFile( options.output + '.map', transpiled.map ) );\n\t\t\t}\n\n\t\t\treturn Promise.all( promises );\n\t\t}\n\n\t\tprocess.stdout.write( transpiled.code );\n\t}\n}\n\nfunction readFromStdin () {\n\treturn new Promise( function ( fulfil, reject ) {\n\t\tvar data = '';\n\n\t\tif ( process.stdin.isTTY ) {\n\t\t\thandleError({ code: 'NO_INPUT_DETECTED' });\n\t\t}\n\n\t\tprocess.stdin.setEncoding( 'utf8' );\n\n\t\tprocess.stdin.on( 'readable', function () {\n\t\t\tvar chunk = process.stdin.read();\n\t\t\tif ( chunk !== null ) {\n\t\t\t\tdata += chunk;\n\t\t\t}\n\t\t});\n\n\t\tprocess.stdin.on( 'end', function() {\n\t\t\tfulfil( data );\n\t\t});\n\n\t\tprocess.stdin.on( 'error', reject );\n\t});\n}\n\nfunction assign ( target ) {\n\tvar sources = [].slice.call( arguments, 1 );\n\n\tsources.forEach( function ( source ) {\n\t\tvar prop;\n\n\t\tfor ( prop in source ) {\n\t\t\tif ( source.hasOwnProperty( prop ) ) {\n\t\t\t\ttarget[ prop ] = source[ prop ];\n\t\t\t}\n\t\t}\n\t});\n\n\treturn target;\n}\n\nfunction filterOutNonJs ( files ) {\n\tvar isJs = /\\.js$/;\n\treturn files.filter( function ( file ) {\n\t\treturn isJs.test( file );\n\t});\n}"
  },
  {
    "path": "bin/showHelp.js",
    "content": "var fs = require( 'fs' ),\n\tpath = require( 'path' );\n\nmodule.exports = function () {\n\tfs.readFile( path.join( __dirname, 'help.md' ), function ( err, result ) {\n\t\tvar help;\n\n\t\tif ( err ) throw err;\n\n\t\thelp = result.toString().replace( '<%= version %>', require( '../package.json' ).version );\n\t\tconsole.log( '\\n' + help + '\\n' );\n\t});\n};"
  },
  {
    "path": "comparison/README.md",
    "content": "# ES6 module transpilers comparison\n\n**Parental advisory: benchmarks are nonsense. Do not rely on benchmarks alone to make decisions!**\n\nIn particular, this test is unfair to traceur, since it is trying to transpile ES6 language features other than module syntax. Since transpile uses traceur under the hood, the same thing probably applies (in some cases, the output from the two transpilers is identical).\n\nThe esnext/es6-module-transpiler project has been excluded as there doesn't seem to be a way to compile code synchronously from a string - instead the filesystem has to get involved, so it would be misleading and unfair to include the results. (It also errors out if it can't follow the dependency graph of your modules, making it very difficult to test.)\n\nInstead, focus on how much nicer, slimmer, and more faithful esperanto's output is. The `output` folder contains the result of transpiling each of the modules in the `input` folder. Note that both transpile and traceur fail to convert certain modules (both fail at `mixedImports.js`, transpile fails at `batchImports.js`).\n\n## Running the tests\n\nInside this folder, do...\n\n```bash\nnode index.js\n```\n\nto run the tests with esperanto and transpile. To run the tests with traceur, do\n\n```bash\nnode index.js traceur\n```\n\nThis is necessary because transpile uses traceur, and you can't have two copies of traceur running simultaneously because it monkey patches stuff, or something.\n"
  },
  {
    "path": "comparison/index.js",
    "content": "var fs = require( 'fs' ),\n\tpath = require( 'path' ),\n\tesperanto = require( '../lib/esperanto' ),\n\tsamples,\n\titerations = 1000;\n\nsamples = fs.readdirSync( path.join( __dirname, 'samples' ) ).map( function ( file ) {\n\treturn {\n\t\tname: file,\n\t\tcode: fs.readFileSync( path.join( __dirname, 'samples', file ) ).toString()\n\t};\n});\n\ntests = [\n\t{\n\t\tname: 'esperanto',\n\t\tfn: function ( code, filename, type ) {\n\t\t\tcode = esperanto[ type === 'amd' ? 'toAmd' : 'toCjs' ]( code, { strict: true });\n\t\t\treturn code;\n\t\t}\n\t},\n\n\t{\n\t\tname: 'traceur',\n\t\tskip: process.argv[2] !== 'traceur',\n\t\tbefore: function () {\n\t\t\ttraceur = require( 'traceur' );\n\t\t},\n\t\tfn: function ( code, filename, type ) {\n\t\t\treturn traceur.compile( code, {\n\t\t\t\tfilename: filename,\n\t\t\t\tmodules: type,\n\t\t\t\tsourceMaps: false\n\t\t\t}).js;\n\t\t},\n\t\tafter: function () {\n\t\t\tdelete require.cache[ require.resolve( 'traceur' ) ];\n\t\t},\n\t\talias: { cjs: 'commonjs' }\n\t},\n\n\t{\n\t\tname: 'transpile',\n\t\tskip: process.argv[2] === 'traceur',\n\t\tbefore: function () {\n\t\t\ttranspile = require( 'transpile' );\n\t\t},\n\t\tfn: function ( code, filename, type ) {\n\t\t\treturn transpile.to({\n\t\t\t\tname: filename,\n\t\t\t\tsource: code,\n\t\t\t\tmetadata: { format: 'es6' }\n\t\t\t}, type )\n\t\t},\n\t\tafter: function () {\n\t\t\tdelete require.cache[ require.resolve( 'transpile' ) ];\n\t\t}\n\t}\n];\n\n\ntests.forEach( function ( test ) {\n\tvar out, type = 'cjs';\n\n\tif ( test.skip ) {\n\t\treturn;\n\t}\n\n\tif ( test.alias ) {\n\t\ttype = test.alias[ type ] || type;\n\t}\n\n\tconsole.log( '\\nRunning %s test...', test.name );\n\n\ttest.before && test.before();\n\n\t// First, save the result to disk\n\tout = path.join( __dirname, 'output', test.name );\n\ttry { fs.mkdirSync( out ); } catch ( err ) {}\n\n\tsamples.forEach( function ( sample ) {\n\t\tvar result = test.fn( sample.code, sample.name, type );\n\t\tfs.writeFileSync( path.join( out, sample.name ), result );\n\t});\n\n\n\t// Then run the tests\n\tvar start = Date.now();\n\tsamples.forEach( function ( sample ) {\n\t\tvar i = iterations;\n\t\twhile ( i-- ) {\n\t\t\ttest.fn( sample.code, sample.name, type );\n\t\t}\n\t});\n\tconsole.log( '...finished %s iterations in %sms\\n', iterations, Date.now() - start );\n\n\n\ttest.after && test.after();\n})\n"
  },
  {
    "path": "comparison/output/esperanto/batchImports.js",
    "content": "(function () {\n\n\t'use strict';\n\n\tvar fs = require('fs');\n\t\n\t// example from http://jsmodules.io\n\tfs.unlink(filename, function(err) { /* check errors */ });\n\n}).call(global);"
  },
  {
    "path": "comparison/output/esperanto/defaultExport.js",
    "content": "(function () {\n\n  'use strict';\n\n  // example from http://jsmodules.io\n  var asap;\n  var isNode = typeof process !== \"undefined\" &&\n  \t\t\t{}.toString.call(process) === \"[object process]\";\n  \n  if (isNode) {\n    asap = process.nextTick;\n  } else if (typeof setImmediate !== \"undefined\") {\n    asap = setImmediate;\n  } else {\n    asap = setTimeout;\n  }\n  \n  exports.default = asap;\n\n}).call(global);"
  },
  {
    "path": "comparison/output/esperanto/defaultImport.js",
    "content": "(function () {\n\n  'use strict';\n\n  var asap = require('asap');\n  \n  // example from http://jsmodules.io\n  asap.default(function() {\n    console.log(\"hello async world!\");\n  });\n\n}).call(global);"
  },
  {
    "path": "comparison/output/esperanto/groupedExports.js",
    "content": "(function () {\n\n  'use strict';\n\n  // example from http://jsmodules.io\n  function getJSON() {\n    // implementation\n  }\n  \n  function postJSON() {\n    // implementation\n  }\n  \n  function animate() {\n    // implementation\n  }\n  \n  exports.getJSON = getJSON;\n  exports.postJSON = postJSON;\n  exports.animate = animate;\n\n}).call(global);"
  },
  {
    "path": "comparison/output/esperanto/inlineNamedExports.js",
    "content": "(function () {\n\n  'use strict';\n\n  exports.requestAnimationFrame = requestAnimationFrame;\n  \n  // example from http://jsmodules.io\n  \n  // exports this function as \"requestAnimationFrame\"\n  function requestAnimationFrame() {\n    // cross-browser requestAnimationFrame\n  }\n  \n  // exports document.location as \"location\"\n  var location = document.location;\n  \n  exports.location = location;\n\n}).call(global);"
  },
  {
    "path": "comparison/output/esperanto/mixedImports.js",
    "content": "(function () {\n\n\t'use strict';\n\n\tvar asap = require('asap');\n\t\n\t// example from http://jsmodules.io\n\n}).call(global);"
  },
  {
    "path": "comparison/output/esperanto/namedExports.js",
    "content": "(function () {\n\n  'use strict';\n\n  // example from http://jsmodules.io\n  var asap;\n  var isNode = typeof process !== \"undefined\" &&\n               {}.toString.call(process) === \"[object process]\";\n  \n  if (isNode) {\n    asap = process.nextTick;\n  } else if (typeof setImmediate !== \"undefined\") {\n    asap = setImmediate;\n  } else {\n    asap = setTimeout;\n  }\n  \n  exports.default = asap;\n  var later = isNode ? process.setImmediate : asap;\n  \n  exports.later = later;\n\n}).call(global);"
  },
  {
    "path": "comparison/output/esperanto/namedImports.js",
    "content": "(function () {\n\n  'use strict';\n\n  var asap = require('asap');\n  \n  // example from http://jsmodules.io\n  asap.later(function() {\n    console.log(\"Running after other network events\");\n  });\n\n}).call(global);"
  },
  {
    "path": "comparison/output/esperanto/renamingImports.js",
    "content": "(function () {\n\n\t'use strict';\n\n\tvar fs = require('fs');\n\t\n\t// example from http://jsmodules.io\n\tfs.unlink(filename, function(err) { /* check errors */ });\n\n}).call(global);"
  },
  {
    "path": "comparison/output/traceur/batchImports.js",
    "content": "\"use strict\";\nvar $__fs__;\nvar fs = ($__fs__ = require(\"fs\"), $__fs__ && $__fs__.__esModule && $__fs__ || {default: $__fs__});\nfs.unlink(filename, function(err) {});\n"
  },
  {
    "path": "comparison/output/traceur/defaultExport.js",
    "content": "\"use strict\";\nObject.defineProperties(exports, {\n  default: {get: function() {\n      return $__default;\n    }},\n  __esModule: {value: true}\n});\nvar asap;\nvar isNode = typeof process !== \"undefined\" && {}.toString.call(process) === \"[object process]\";\nif (isNode) {\n  asap = process.nextTick;\n} else if (typeof setImmediate !== \"undefined\") {\n  asap = setImmediate;\n} else {\n  asap = setTimeout;\n}\nvar $__default = asap;\n"
  },
  {
    "path": "comparison/output/traceur/defaultImport.js",
    "content": "\"use strict\";\nvar $__asap__;\nvar asap = ($__asap__ = require(\"asap\"), $__asap__ && $__asap__.__esModule && $__asap__ || {default: $__asap__}).default;\nasap(function() {\n  console.log(\"hello async world!\");\n});\n"
  },
  {
    "path": "comparison/output/traceur/groupedExports.js",
    "content": "\"use strict\";\nObject.defineProperties(exports, {\n  getJSON: {get: function() {\n      return getJSON;\n    }},\n  postJSON: {get: function() {\n      return postJSON;\n    }},\n  animate: {get: function() {\n      return animate;\n    }},\n  __esModule: {value: true}\n});\n;\nfunction getJSON() {}\nfunction postJSON() {}\nfunction animate() {}\n"
  },
  {
    "path": "comparison/output/traceur/inlineNamedExports.js",
    "content": "\"use strict\";\nObject.defineProperties(exports, {\n  requestAnimationFrame: {get: function() {\n      return requestAnimationFrame;\n    }},\n  location: {get: function() {\n      return location;\n    }},\n  __esModule: {value: true}\n});\nfunction requestAnimationFrame() {}\nvar location = document.location;\n"
  },
  {
    "path": "comparison/output/traceur/mixedImports.js",
    "content": "undefined"
  },
  {
    "path": "comparison/output/traceur/namedExports.js",
    "content": "\"use strict\";\nObject.defineProperties(exports, {\n  default: {get: function() {\n      return $__default;\n    }},\n  later: {get: function() {\n      return later;\n    }},\n  __esModule: {value: true}\n});\nvar asap;\nvar isNode = typeof process !== \"undefined\" && {}.toString.call(process) === \"[object process]\";\nif (isNode) {\n  asap = process.nextTick;\n} else if (typeof setImmediate !== \"undefined\") {\n  asap = setImmediate;\n} else {\n  asap = setTimeout;\n}\nvar $__default = asap;\nvar later = isNode ? process.setImmediate : asap;\n"
  },
  {
    "path": "comparison/output/traceur/namedImports.js",
    "content": "\"use strict\";\nvar $__asap__;\nvar later = ($__asap__ = require(\"asap\"), $__asap__ && $__asap__.__esModule && $__asap__ || {default: $__asap__}).later;\nlater(function() {\n  console.log(\"Running after other network events\");\n});\n"
  },
  {
    "path": "comparison/output/traceur/renamingImports.js",
    "content": "\"use strict\";\nvar $__fs__;\nvar rm = ($__fs__ = require(\"fs\"), $__fs__ && $__fs__.__esModule && $__fs__ || {default: $__fs__}).unlink;\nrm(filename, function(err) {});\n"
  },
  {
    "path": "comparison/output/transpile/batchImports.js",
    "content": "undefined"
  },
  {
    "path": "comparison/output/transpile/defaultExport.js",
    "content": "\"use strict\";\nObject.defineProperties(exports, {\n  default: {get: function() {\n      return $__default;\n    }},\n  __esModule: {value: true}\n});\nvar asap;\nvar isNode = typeof process !== \"undefined\" && {}.toString.call(process) === \"[object process]\";\nif (isNode) {\n  asap = process.nextTick;\n} else if (typeof setImmediate !== \"undefined\") {\n  asap = setImmediate;\n} else {\n  asap = setTimeout;\n}\nvar $__default = asap;\n"
  },
  {
    "path": "comparison/output/transpile/defaultImport.js",
    "content": "\"use strict\";\nvar asap = $traceurRuntime.assertObject(require(\"asap\")).default;\nasap(function() {\n  console.log(\"hello async world!\");\n});\n"
  },
  {
    "path": "comparison/output/transpile/groupedExports.js",
    "content": "\"use strict\";\nObject.defineProperties(exports, {\n  getJSON: {get: function() {\n      return getJSON;\n    }},\n  postJSON: {get: function() {\n      return postJSON;\n    }},\n  animate: {get: function() {\n      return animate;\n    }},\n  __esModule: {value: true}\n});\n;\nfunction getJSON() {}\nfunction postJSON() {}\nfunction animate() {}\n"
  },
  {
    "path": "comparison/output/transpile/inlineNamedExports.js",
    "content": "\"use strict\";\nObject.defineProperties(exports, {\n  requestAnimationFrame: {get: function() {\n      return requestAnimationFrame;\n    }},\n  location: {get: function() {\n      return location;\n    }},\n  __esModule: {value: true}\n});\nfunction requestAnimationFrame() {}\nvar location = document.location;\n"
  },
  {
    "path": "comparison/output/transpile/mixedImports.js",
    "content": "undefined"
  },
  {
    "path": "comparison/output/transpile/namedExports.js",
    "content": "\"use strict\";\nObject.defineProperties(exports, {\n  default: {get: function() {\n      return $__default;\n    }},\n  later: {get: function() {\n      return later;\n    }},\n  __esModule: {value: true}\n});\nvar asap;\nvar isNode = typeof process !== \"undefined\" && {}.toString.call(process) === \"[object process]\";\nif (isNode) {\n  asap = process.nextTick;\n} else if (typeof setImmediate !== \"undefined\") {\n  asap = setImmediate;\n} else {\n  asap = setTimeout;\n}\nvar $__default = asap;\nvar later = isNode ? process.setImmediate : asap;\n"
  },
  {
    "path": "comparison/output/transpile/namedImports.js",
    "content": "\"use strict\";\nvar later = $traceurRuntime.assertObject(require(\"asap\")).later;\nlater(function() {\n  console.log(\"Running after other network events\");\n});\n"
  },
  {
    "path": "comparison/output/transpile/renamingImports.js",
    "content": "\"use strict\";\nvar rm = $traceurRuntime.assertObject(require(\"fs\")).unlink;\nrm(filename, function(err) {});\n"
  },
  {
    "path": "comparison/package.json",
    "content": "{\n  \"name\": \"esperanto-benchmark\",\n  \"description\": \"quick and dirty script to illustrate esperanto speed advantage\",\n  \"version\": \"0.1.0\",\n  \"devDependencies\": {\n    \"traceur\": \"0.0.58\",\n    \"transpile\": \"~0.2.0\",\n    \"es6-module-transpiler\": \"~0.6.0\"\n  }\n}\n"
  },
  {
    "path": "comparison/samples/batchImports.js",
    "content": "// example from http://jsmodules.io\nimport * as fs from \"fs\";\n\nfs.unlink(filename, function(err) { /* check errors */ });\n"
  },
  {
    "path": "comparison/samples/defaultExport.js",
    "content": "// example from http://jsmodules.io\nvar asap;\nvar isNode = typeof process !== \"undefined\" &&\n\t\t\t{}.toString.call(process) === \"[object process]\";\n\nif (isNode) {\n  asap = process.nextTick;\n} else if (typeof setImmediate !== \"undefined\") {\n  asap = setImmediate;\n} else {\n  asap = setTimeout;\n}\n\nexport default asap;\n"
  },
  {
    "path": "comparison/samples/defaultImport.js",
    "content": "// example from http://jsmodules.io\nimport asap from \"asap\";\n\nasap(function() {\n  console.log(\"hello async world!\");\n});\n"
  },
  {
    "path": "comparison/samples/groupedExports.js",
    "content": "// example from http://jsmodules.io\nexport { getJSON, postJSON, animate };\n\nfunction getJSON() {\n  // implementation\n}\n\nfunction postJSON() {\n  // implementation\n}\n\nfunction animate() {\n  // implementation\n}\n"
  },
  {
    "path": "comparison/samples/inlineNamedExports.js",
    "content": "// example from http://jsmodules.io\n\n// exports this function as \"requestAnimationFrame\"\nexport function requestAnimationFrame() {\n  // cross-browser requestAnimationFrame\n}\n\n// exports document.location as \"location\"\nexport var location = document.location;\n"
  },
  {
    "path": "comparison/samples/mixedImports.js",
    "content": "// example from http://jsmodules.io\nimport asap, { later } from \"asap\";\n"
  },
  {
    "path": "comparison/samples/namedExports.js",
    "content": "// example from http://jsmodules.io\nvar asap;\nvar isNode = typeof process !== \"undefined\" &&\n             {}.toString.call(process) === \"[object process]\";\n\nif (isNode) {\n  asap = process.nextTick;\n} else if (typeof setImmediate !== \"undefined\") {\n  asap = setImmediate;\n} else {\n  asap = setTimeout;\n}\n\nexport default asap;\nexport var later = isNode ? process.setImmediate : asap;\n"
  },
  {
    "path": "comparison/samples/namedImports.js",
    "content": "// example from http://jsmodules.io\nimport { later } from \"asap\";\n\nlater(function() {\n  console.log(\"Running after other network events\");\n});\n"
  },
  {
    "path": "comparison/samples/renamingImports.js",
    "content": "// example from http://jsmodules.io\nimport { unlink as rm } from \"fs\";\n\nrm(filename, function(err) { /* check errors */ });\n"
  },
  {
    "path": "gobblefile.js",
    "content": "var gobble = require( 'gobble' );\nvar path = require( 'path' );\nvar resolve = require( 'resolve' );\nvar Promise = require( 'sander' ).Promise;\n\ngobble.cwd( __dirname );\n\nvar banner = require( 'fs' ).readFileSync( __dirname + '/src/banner.js', 'utf-8' )\n\t.replace( '${VERSION}', require( './package.json' ).version )\n\t.replace( '${TODAY}', today() );\n\nvar es5 = gobble( 'src' ).transform( 'babel' );\n\nvar node = es5\n\t.transform( 'esperanto-bundle', {\n\t\tentry: 'esperanto',\n\t\ttype: 'cjs',\n\t\tbanner: banner,\n\t\tstrict: true,\n\t\tsourceMap: true\n\t});\n\nvar browser = es5\n\t.transform( 'esperanto-bundle', {\n\t\tentry: 'esperanto',\n\t\tdest: 'esperanto.browser.js',\n\t\ttype: 'umd',\n\t\tname: 'esperanto',\n\t\tskip: [ 'bundler/getBundle' ],\n\t\tbanner: banner,\n\t\tstrict: true,\n\t\tsourceMap: true,\n\n\t\t// bundle magic-string and its dependency, vlq\n\t\tresolvePath: function ( importee, importer ) {\n\t\t\treturn new Promise( function ( fulfil, reject ) {\n\t\t\t\tvar callback = function ( err, result ) {\n\t\t\t\t\tif ( err ) {\n\t\t\t\t\t\treject( err );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfulfil( result );\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tresolve( importee, {\n\t\t\t\t\tbasedir: path.dirname( importer ),\n\t\t\t\t\tpackageFilter: function ( pkg ) {\n\t\t\t\t\t\tif ( pkg[ 'jsnext:main' ] ) {\n\t\t\t\t\t\t\tpkg.main = pkg[ 'jsnext:main' ];\n\t\t\t\t\t\t\treturn pkg;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar err = new Error( 'package ' + pkg.name + ' does not supply a jsnext:main field' );\n\t\t\t\t\t\terr.code = 'ENOENT'; // hack\n\t\t\t\t\t\treject( err );\n\t\t\t\t\t\treturn {};\n\t\t\t\t\t}\n\t\t\t\t}, callback );\n\t\t\t});\n\t\t}\n\t});\n\nmodule.exports = gobble([ node, browser ]);\n\n\nfunction today () {\n\tvar d = new Date();\n\n\treturn [\n\t\td.getFullYear(),\n\t\tpad( d.getMonth() + 1 ),\n\t\tpad( d.getDate() )\n\t].join( '-' );\n}\n\nfunction pad ( num ) {\n\treturn num < 10 ? '0' + num : num;\n}"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"esperanto\",\n  \"description\": \"An easier way to convert ES6 modules to AMD and CommonJS\",\n  \"version\": \"0.7.6\",\n  \"author\": \"Rich Harris\",\n  \"repository\": \"https://github.com/esperantojs/esperanto\",\n  \"license\": \"MIT\",\n  \"dependencies\": {\n    \"acorn\": \"^1.0.1\",\n    \"chalk\": \"^1.0.0\",\n    \"magic-string\": \"^0.4.9\",\n    \"minimist\": \"^1.1.0\",\n    \"sander\": \"^0.5.1\"\n  },\n  \"main\": \"dist/esperanto.js\",\n  \"jsnext:main\": \"src/esperanto.js\",\n  \"bin\": {\n    \"esperanto\": \"./bin/index.js\"\n  },\n  \"devDependencies\": {\n    \"gobble\": \"^0.7.2\",\n    \"gobble-babel\": \"^5.1.0\",\n    \"gobble-cli\": \"^0.4.2\",\n    \"gobble-esperanto-bundle\": \"^0.2.0\",\n    \"gobble-uglifyjs\": \"^0.1.0\",\n    \"magic-string\": \"^0.6.0\",\n    \"mocha\": \"^2.1.0\",\n    \"resolve\": \"^1.1.0\",\n    \"source-map\": \"^0.1.40\",\n    \"source-map-support\": \"^0.2.10\"\n  },\n  \"files\": [\n    \"esperanto.js\",\n    \"src\",\n    \"dist\",\n    \"bin\",\n    \"README.md\"\n  ],\n  \"scripts\": {\n    \"build\": \"gobble build -f dist\",\n    \"pretest\": \"npm run build\",\n    \"test\": \"mocha\",\n    \"prepublish\": \"npm test\"\n  }\n}\n"
  },
  {
    "path": "src/banner.js",
    "content": "/*\n\tesperanto.js v${VERSION} - ${TODAY}\n\thttp://esperantojs.org\n\n\tReleased under the MIT License.\n*/\n\n"
  },
  {
    "path": "src/bundler/builders/concat.js",
    "content": "import packageResult from 'utils/packageResult';\n\nexport default function concat ( bundle, options ) {\n\t// This bundle must be self-contained - no imports or exports\n\tif ( bundle.externalModules.length || bundle.entryModule.exports.length ) {\n\t\tthrow new Error( `bundle.concat() can only be used with bundles that have no imports/exports (imports: [${bundle.externalModules.map(x=>x.id).join(', ')}], exports: [${bundle.entryModule.exports.join(', ')}])` );\n\t}\n\n\t// TODO test these options\n\tlet intro = 'intro' in options ? options.intro : `(function () { 'use strict';\\n\\n`;\n\tlet outro = 'outro' in options ? options.outro : '\\n\\n})();';\n\tlet indent;\n\n\tif ( !( 'indent' in options ) || options.indent === true ) {\n\t\tindent = bundle.body.getIndentString();\n\t} else {\n\t\tindent = options.indent || '';\n\t}\n\n\tbundle.body.trimLines().indent( indent ).prepend( intro ).append( outro );\n\n\treturn packageResult( bundle, bundle.body, options, 'toString', true );\n}\n"
  },
  {
    "path": "src/bundler/builders/defaultsMode/amd.js",
    "content": "import packageResult from '../../../utils/packageResult';\nimport amdIntro from '../../../utils/amd/amdIntro';\n\nexport default function amd ( bundle, options ) {\n\tlet defaultName = bundle.entryModule.identifierReplacements.default;\n\tif ( defaultName ) {\n\t\tbundle.body.append( `\\n\\nreturn ${defaultName};` );\n\t}\n\n\tlet intro = amdIntro({\n\t\tname: options.amdName,\n\t\timports: bundle.externalModules,\n\t\tindentStr: bundle.body.getIndentString(),\n\t\tuseStrict: options.useStrict !== false\n\t});\n\n\tbundle.body.indent().prepend( intro ).trimLines().append( '\\n\\n});' );\n\treturn packageResult( bundle, bundle.body, options, 'toAmd', true );\n}"
  },
  {
    "path": "src/bundler/builders/defaultsMode/cjs.js",
    "content": "import packageResult from 'utils/packageResult';\nimport { req } from 'utils/mappers';\n\nexport default function cjs ( bundle, options ) {\n\tlet importBlock = bundle.externalModules.map( x => {\n\t\treturn `var ${x.name} = ${req(x.id)};`;\n\t}).join( '\\n' );\n\n\tif ( importBlock ) {\n\t\tbundle.body.prepend( importBlock + '\\n\\n' );\n\t}\n\n\tlet defaultName = bundle.entryModule.identifierReplacements.default;\n\tif ( defaultName ) {\n\t\tbundle.body.append( `\\n\\nmodule.exports = ${defaultName};` );\n\t}\n\n\tif ( options.useStrict !== false ) {\n\t\tbundle.body.prepend(\"'use strict';\\n\\n\").trimLines();\n\t}\n\n\treturn packageResult( bundle, bundle.body, options, 'toCjs', true );\n}\n"
  },
  {
    "path": "src/bundler/builders/defaultsMode/index.js",
    "content": "import amd from './amd';\nimport cjs from './cjs';\nimport umd from './umd';\n\nexport default {\n\tamd: amd,\n\tcjs: cjs,\n\tumd: umd\n};\n"
  },
  {
    "path": "src/bundler/builders/defaultsMode/umd.js",
    "content": "import packageResult from 'utils/packageResult';\nimport umdIntro from 'utils/umd/umdIntro';\nimport requireName from 'utils/umd/requireName';\n\nexport default function umd ( bundle, options ) {\n\trequireName( options );\n\n\tlet entry = bundle.entryModule;\n\n\tlet intro = umdIntro({\n\t\thasExports: entry.exports.length > 0,\n\t\timports: bundle.externalModules,\n\t\tamdName: options.amdName,\n\t\tname: options.name,\n\t\tindentStr: bundle.body.getIndentString(),\n\t\tuseStrict: options.useStrict !== false\n\t});\n\n\tif ( entry.defaultExport ) {\n\t\tbundle.body.append( `\\n\\nreturn ${entry.identifierReplacements.default};` );\n\t}\n\n\tbundle.body.indent().prepend( intro ).trimLines().append('\\n\\n}));');\n\n\treturn packageResult( bundle, bundle.body, options, 'toUmd', true );\n}\n"
  },
  {
    "path": "src/bundler/builders/index.js",
    "content": "// TODO rewrite with named imports/exports\nimport defaultsMode from './defaultsMode';\nimport strictMode from './strictMode';\n\nexport default {\n\tdefaultsMode: defaultsMode,\n\tstrictMode: strictMode\n};\n"
  },
  {
    "path": "src/bundler/builders/strictMode/amd.js",
    "content": "import packageResult from '../../../utils/packageResult';\nimport amdIntro from '../../../utils/amd/amdIntro';\nimport getExportBlock from './utils/getExportBlock';\n\nexport default function amd ( bundle, options ) {\n\tlet externalDefaults = bundle.externalModules.filter( needsDefault );\n\tlet entry = bundle.entryModule;\n\n\tif ( externalDefaults.length ) {\n\t\tlet defaultsBlock = externalDefaults.map( x => {\n\t\t\t// Case 1: default is used, and named is not\n\t\t\tif ( !x.needsNamed ) {\n\t\t\t\treturn `${x.name} = ('default' in ${x.name} ? ${x.name}['default'] : ${x.name});`;\n\t\t\t}\n\n\t\t\t// Case 2: both default and named are used\n\t\t\treturn `var ${x.name}__default = ('default' in ${x.name} ? ${x.name}['default'] : ${x.name});`;\n\t\t}).join( '\\n' );\n\n\t\tbundle.body.prepend( defaultsBlock + '\\n\\n' );\n\t}\n\n\tif ( entry.defaultExport ) {\n\t\tbundle.body.append( '\\n\\n' + getExportBlock( entry ) );\n\t}\n\n\tlet intro = amdIntro({\n\t\tname: options.amdName,\n\t\timports: bundle.externalModules,\n\t\thasExports: entry.exports.length,\n\t\tindentStr: bundle.body.getIndentString(),\n\t\tuseStrict: options.useStrict !== false\n\t});\n\n\tbundle.body.indent().prepend( intro ).trimLines().append( '\\n\\n});' );\n\treturn packageResult( bundle, bundle.body, options, 'toAmd', true );\n}\n\nfunction needsDefault ( externalModule ) {\n\treturn externalModule.needsDefault;\n}\n"
  },
  {
    "path": "src/bundler/builders/strictMode/cjs.js",
    "content": "import packageResult from 'utils/packageResult';\nimport getExportBlock from './utils/getExportBlock';\nimport { req } from 'utils/mappers';\n\nexport default function cjs ( bundle, options ) {\n\tlet entry = bundle.entryModule;\n\n\tlet importBlock = bundle.externalModules.map( x => {\n\t\tlet statement = `var ${x.name} = ${req(x.id)};`;\n\n\t\tif ( x.needsDefault ) {\n\t\t\tstatement += '\\n' +\n\t\t\t\t( x.needsNamed ? `var ${x.name}__default` : x.name ) +\n\t\t\t\t` = ('default' in ${x.name} ? ${x.name}['default'] : ${x.name});`;\n\t\t}\n\n\t\treturn statement;\n\t}).join( '\\n' );\n\n\tif ( importBlock ) {\n\t\tbundle.body.prepend( importBlock + '\\n\\n' );\n\t}\n\n\tif ( entry.defaultExport ) {\n\t\tbundle.body.append( '\\n\\n' + getExportBlock( entry ) );\n\t}\n\n\tif ( options.useStrict !== false ) {\n\t\tbundle.body.prepend(\"'use strict';\\n\\n\").trimLines();\n\t}\n\n\treturn packageResult( bundle, bundle.body, options, 'toCjs', true );\n}\n"
  },
  {
    "path": "src/bundler/builders/strictMode/index.js",
    "content": "import amd from './amd';\nimport cjs from './cjs';\nimport umd from './umd';\n\nexport default {\n\tamd: amd,\n\tcjs: cjs,\n\tumd: umd\n};\n"
  },
  {
    "path": "src/bundler/builders/strictMode/umd.js",
    "content": "import umdIntro from 'utils/umd/umdIntro';\nimport requireName from 'utils/umd/requireName';\nimport packageResult from 'utils/packageResult';\nimport getExportBlock from './utils/getExportBlock';\n\nexport default function umd ( bundle, options ) {\n\trequireName( options );\n\n\tlet entry = bundle.entryModule;\n\n\tlet intro = umdIntro({\n\t\thasExports: entry.exports.length > 0,\n\t\timports: bundle.externalModules,\n\t\texternalDefaults: bundle.externalModules.filter( needsDefault ),\n\t\tamdName: options.amdName,\n\t\tname: options.name,\n\t\tindentStr: bundle.body.getIndentString(),\n\t\tstrict: true,\n\t\tuseStrict: options.useStrict !== false\n\t});\n\n\tif ( entry.defaultExport ) {\n\t\tbundle.body.append( '\\n\\n' + getExportBlock( entry ) );\n\t}\n\n\tbundle.body.indent().prepend( intro ).trimLines().append('\\n\\n}));');\n\n\treturn packageResult( bundle, bundle.body, options, 'toUmd', true );\n}\n\nfunction needsDefault ( externalModule ) {\n\treturn externalModule.needsDefault;\n}\n"
  },
  {
    "path": "src/bundler/builders/strictMode/utils/getExportBlock.js",
    "content": "export default function getExportBlock ( entry ) {\n\tlet name = entry.identifierReplacements.default;\n\treturn `exports['default'] = ${name};`;\n}\n"
  },
  {
    "path": "src/bundler/combine/getRenamedImports.js",
    "content": "export default function getRenamedImports ( mod ) {\n\tlet renamed = [];\n\n\tmod.imports.forEach( x => {\n\t\tif ( x.specifiers ) {\n\t\t\tx.specifiers.forEach( s => {\n\t\t\t\tif ( s.name !== s.as && !~renamed.indexOf( s.name ) ) {\n\t\t\t\t\trenamed.push( s.name );\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\n\treturn renamed;\n}"
  },
  {
    "path": "src/bundler/combine/index.js",
    "content": "import MagicString from 'magic-string';\nimport populateModuleNames from './populateModuleNames';\nimport populateExternalModuleImports from './populateExternalModuleImports';\nimport populateIdentifierReplacements from './populateIdentifierReplacements';\nimport resolveExports from './resolveExports';\nimport transformBody from './transformBody';\n\nexport default function combine ( bundle ) {\n\tbundle.body = new MagicString.Bundle({\n\t\tseparator: '\\n\\n'\n\t});\n\n\t// give each module in the bundle a unique name\n\tpopulateModuleNames( bundle );\n\n\t// determine which specifiers are imported from\n\t// external modules\n\tpopulateExternalModuleImports( bundle );\n\n\t// determine which identifiers need to be replaced\n\t// inside this bundle\n\tpopulateIdentifierReplacements( bundle );\n\n\tbundle.exports = resolveExports( bundle );\n\n\tbundle.modules.forEach( mod => {\n\t\t// verify that this module doesn't import non-exported identifiers\n\t\tmod.imports.forEach( x => {\n\t\t\tconst imported = x.module;\n\n\t\t\tif ( imported.isExternal || imported.isSkipped || x.isBatch ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tx.specifiers.forEach( s => {\n\t\t\t\tif ( !imported.doesExport[ s.name ] ) {\n\t\t\t\t\tthrow new Error( `Module '${imported.id}' does not export '${s.name}' (imported by '${mod.id}')` );\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\tbundle.body.addSource({\n\t\t\tfilename: mod.path,\n\t\t\tcontent: transformBody( bundle, mod, mod.body ),\n\t\t\tindentExclusionRanges: mod.ast._templateLiteralRanges\n\t\t});\n\t});\n}\n"
  },
  {
    "path": "src/bundler/combine/populateExternalModuleImports.js",
    "content": "export default function populateExternalModuleImports ( bundle ) {\n\tbundle.modules.forEach( mod => {\n\t\tmod.imports.forEach( x => {\n\t\t\tconst externalModule = x.module;\n\n\t\t\tif ( !externalModule.isExternal ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tx.specifiers.forEach( s => {\n\t\t\t\tif ( s.isDefault ) {\n\t\t\t\t\texternalModule.needsDefault = true;\n\t\t\t\t} else {\n\t\t\t\t\texternalModule.needsNamed = true;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t});\n}"
  },
  {
    "path": "src/bundler/combine/populateIdentifierReplacements.js",
    "content": "import hasOwnProp from 'utils/hasOwnProp';\nimport topLevelScopeConflicts from './topLevelScopeConflicts';\n\n/**\n * Figures out which identifiers need to be rewritten within\n   a bundle to avoid conflicts\n * @param {object} bundle - the bundle\n * @returns {object}\n */\nexport default function populateIdentifierReplacements ( bundle ) {\n\t// first, discover conflicts\n\tlet conflicts = topLevelScopeConflicts( bundle );\n\n\t// then figure out what identifiers need to be created\n\t// for default exports\n\tbundle.modules.forEach( mod => {\n\t\tlet x = mod.defaultExport;\n\n\t\tif ( x ) {\n\t\t\tlet result;\n\n\t\t\tif ( x.hasDeclaration && x.name ) {\n\t\t\t\tresult = hasOwnProp.call( conflicts, x.name ) || otherModulesDeclare( mod, x.name ) ?\n\t\t\t\t\t`${mod.name}__${x.name}` :\n\t\t\t\t\tx.name;\n\t\t\t} else {\n\t\t\t\tresult = hasOwnProp.call( conflicts, mod.name ) || ( x.value !== mod.name && ~mod.ast._topLevelNames.indexOf( mod.name )) || otherModulesDeclare( mod, mod.name ) ?\n\t\t\t\t\t`${mod.name}__default` :\n\t\t\t\t\tmod.name;\n\t\t\t}\n\n\t\t\tmod.identifierReplacements.default = result;\n\t\t}\n\t});\n\n\t// then determine which existing identifiers\n\t// need to be replaced\n\tbundle.modules.forEach( mod => {\n\t\tlet moduleIdentifiers = mod.identifierReplacements;\n\n\t\tmod.ast._topLevelNames.forEach( n => {\n\t\t\tmoduleIdentifiers[n] = hasOwnProp.call( conflicts, n ) ?\n\t\t\t\t`${mod.name}__${n}` :\n\t\t\t\tn;\n\t\t});\n\n\t\tmod.imports.forEach( x => {\n\t\t\tif ( x.passthrough ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst imported = x.module;\n\n\t\t\tx.specifiers.forEach( s => {\n\t\t\t\tlet replacement;\n\n\t\t\t\tif ( s.isBatch ) {\n\t\t\t\t\treplacement = x.module.name;\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tlet mod;\n\t\t\t\t\tlet specifierName;\n\n\t\t\t\t\tif ( s.origin ) {\n\t\t\t\t\t\t// chained bindings\n\t\t\t\t\t\tmod = s.origin.module;\n\t\t\t\t\t\tspecifierName = s.origin.name;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmod = imported;\n\t\t\t\t\t\tspecifierName = s.name;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst moduleName = mod && mod.name;\n\n\t\t\t\t\tif ( specifierName === 'default' ) {\n\t\t\t\t\t\t// if it's an external module, always use __default if the\n\t\t\t\t\t\t// bundle also uses named imports\n\t\t\t\t\t\tif ( imported.isExternal ) {\n\t\t\t\t\t\t\treplacement = imported.needsNamed ? `${moduleName}__default` : moduleName;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// TODO We currently need to check for the existence of `mod`, because modules\n\t\t\t\t\t\t// can be skipped. Would be better to replace skipped modules with dummies\n\t\t\t\t\t\t// - see https://github.com/Rich-Harris/esperanto/issues/32\n\t\t\t\t\t\telse if ( mod && !mod.isSkipped ) {\n\t\t\t\t\t\t\treplacement = mod.identifierReplacements.default;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ( !imported.isExternal ) {\n\t\t\t\t\t\treplacement = hasOwnProp.call( conflicts, specifierName ) ?\n\t\t\t\t\t\t\t`${moduleName}__${specifierName}` :\n\t\t\t\t\t\t\tspecifierName;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treplacement = moduleName + '.' + specifierName;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( replacement !== s.as ) {\n\t\t\t\t\tmoduleIdentifiers[ s.as ] = replacement;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t});\n\n\tfunction otherModulesDeclare ( mod, replacement ) {\n\t\tvar i, otherMod;\n\n\t\ti = bundle.modules.length;\n\t\twhile ( i-- ) {\n\t\t\totherMod = bundle.modules[i];\n\n\t\t\tif ( mod === otherMod ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( hasOwnProp.call( otherMod.ast._declared, replacement ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/bundler/combine/populateModuleNames.js",
    "content": "import hasOwnProp from 'utils/hasOwnProp';\nimport builtins from 'utils/builtins';\nimport { default as sanitize, splitPath } from 'utils/sanitize';\n\nexport default function getUniqueNames ( bundle ) {\n\tlet { modules, externalModules } = bundle;\n\tlet userNames = bundle.names;\n\tlet names = {};\n\n\tlet used = modules.reduce( ( declared, mod ) => {\n\t\tconst defaultExport = mod.defaultExport;\n\t\tconst defaultExportName = defaultExport &&\n\t\t                          !defaultExport.unsafe &&\n\t\t                          defaultExport.type === 'expression' &&\n\t\t                          defaultExport.node.declaration &&\n\t\t                          defaultExport.node.declaration.type === 'Identifier' &&\n\t\t                          defaultExport.node.declaration.name;\n\n\t\tObject.keys( mod.ast._declared ).forEach( x => {\n\t\t\t// special case - `export default foo`\n\t\t\tif ( x === defaultExportName ) return;\n\t\t\tdeclared[x] = true;\n\t\t});\n\t\treturn declared;\n\t}, {} );\n\n\t// copy builtins\n\tbuiltins.forEach( n => used[n] = true );\n\n\t// copy user-specified names\n\tif ( userNames ) {\n\t\tObject.keys( userNames ).forEach( id => {\n\t\t\tnames[ id ] = userNames[ id ];\n\t\t\tused[ userNames[ id ] ] = true;\n\t\t});\n\t}\n\n\t// infer names from default imports - e.g. with `import _ from './utils'`,\n\t// use '_' instead of generating a name from 'utils'\n\tfunction inferName ( x ) {\n\t\tif ( x.isDefault && !hasOwnProp.call( names, x.module.id ) && !hasOwnProp.call( used, x.as ) ) {\n\t\t\tnames[ x.module.id ] = x.as;\n\t\t\tused[ x.as ] = true;\n\t\t}\n\t}\n\tmodules.forEach( mod => {\n\t\tmod.imports.forEach( inferName );\n\t});\n\n\t// for the rest, make names as compact as possible without\n\t// introducing conflicts\n\tmodules.concat( externalModules ).forEach( mod => {\n\t\t// is this already named?\n\t\tif ( hasOwnProp.call( names, mod.id ) ) {\n\t\t\tmod.name = names[ mod.id ];\n\t\t\treturn;\n\t\t}\n\n\t\tlet name;\n\t\tlet parts = splitPath( mod.id );\n\t\tlet i = parts.length;\n\n\t\twhile ( i-- ) {\n\t\t\tname = sanitize( parts.slice( i ).join( '_' ) );\n\n\t\t\tif ( !hasOwnProp.call( used, name ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\twhile ( hasOwnProp.call( used, name ) ) {\n\t\t\tname = '_' + name;\n\t\t}\n\n\t\tused[ name ] = true;\n\t\tmod.name = name;\n\t});\n\n\treturn names;\n}\n"
  },
  {
    "path": "src/bundler/combine/resolveExports.js",
    "content": "export default function resolveExports ( bundle ) {\n\tlet bundleExports = {};\n\n\tbundle.entryModule.exports.forEach( x => {\n\t\tif ( x.specifiers ) {\n\t\t\tx.specifiers.forEach( s => {\n\t\t\t\tlet module;\n\t\t\t\tlet name;\n\n\t\t\t\tif ( s.origin ) {\n\t\t\t\t\tmodule = s.origin.module;\n\t\t\t\t\tname = s.origin.name;\n\t\t\t\t} else {\n\t\t\t\t\tmodule = bundle.entryModule;\n\t\t\t\t\tname = s.name;\n\t\t\t\t}\n\n\t\t\t\taddExport( module, name, s.as );\n\t\t\t});\n\t\t}\n\n\t\telse if ( !x.isDefault && x.name ) {\n\t\t\taddExport( bundle.entryModule, x.name, x.name );\n\t\t}\n\t});\n\n\tfunction addExport ( module, name, as ) {\n\t\tif ( !bundleExports[ module.id ] ) {\n\t\t\tbundleExports[ module.id ] = {};\n\t\t}\n\n\t\tbundleExports[ module.id ][ name ] = as;\n\t}\n\n\treturn bundleExports;\n}\n"
  },
  {
    "path": "src/bundler/combine/topLevelScopeConflicts.js",
    "content": "import hasOwnProp from 'utils/hasOwnProp';\nimport builtins from 'utils/builtins';\nimport getUnscopedNames from 'utils/ast/getUnscopedNames';\nimport { getName } from 'utils/mappers';\nimport getRenamedImports from './getRenamedImports';\n\nexport default function topLevelScopeConflicts ( bundle ) {\n\tlet conflicts = {};\n\tlet inBundle = {};\n\tlet importNames = bundle.externalModules.map( getName );\n\n\tbundle.modules.forEach( mod => {\n\t\tlet names = builtins\n\n\t\t\t// all top defined identifiers are in top scope\n\t\t\t.concat( mod.ast._topLevelNames )\n\n\t\t\t// all unattributed identifiers could collide with top scope\n\t\t\t.concat( getUnscopedNames( mod ) )\n\n\t\t\t.concat( importNames )\n\n\t\t\t.concat( getRenamedImports( mod ) );\n\n\t\tif ( mod._exportsNamespace ) {\n\t\t\tconflicts[ mod.name ] = true;\n\t\t}\n\n\t\t// merge this module's top scope with bundle top scope\n\t\tnames.forEach( name => {\n\t\t\tif ( hasOwnProp.call( inBundle, name ) ) {\n\t\t\t\tconflicts[ name ] = true;\n\t\t\t} else {\n\t\t\t\tinBundle[ name ] = true;\n\t\t\t}\n\t\t});\n\t});\n\n\treturn conflicts;\n}"
  },
  {
    "path": "src/bundler/combine/transformBody.js",
    "content": "import hasOwnProp from 'utils/hasOwnProp';\nimport getReadOnlyIdentifiers from 'utils/getReadOnlyIdentifiers';\nimport traverseAst from 'utils/ast/traverse';\n\nexport default function transformBody ( bundle, mod, body ) {\n\tlet identifierReplacements = mod.identifierReplacements;\n\tlet [ importedBindings, importedNamespaces ] = getReadOnlyIdentifiers( mod.imports );\n\n\tlet exportNames = hasOwnProp.call( bundle.exports, mod.id ) && bundle.exports[ mod.id ];\n\n\ttraverseAst( mod.ast, body, identifierReplacements, importedBindings, importedNamespaces, exportNames );\n\n\t// Remove import statements\n\tmod.imports.forEach( x => {\n\t\tif ( !x.passthrough ) {\n\t\t\tbody.remove( x.start, x.next );\n\t\t}\n\t});\n\n\tlet shouldExportEarly = {};\n\n\t// Remove export statements\n\tmod.exports.forEach( x => {\n\t\tvar name;\n\n\t\tif ( x.isDefault ) {\n\t\t\tif ( x.type === 'namedFunction' || x.type === 'namedClass' ) {\n\t\t\t\t// if you have a default export like\n\t\t\t\t//\n\t\t\t\t//     export default function foo () {...}\n\t\t\t\t//\n\t\t\t\t// you need to rewrite it as\n\t\t\t\t//\n\t\t\t\t//     function foo () {...}\n\t\t\t\t//     exports.default = foo;\n\t\t\t\t//\n\t\t\t\t// as the `foo` reference may be used elsewhere\n\n\t\t\t\t// remove the `export default `, keep the rest\n\t\t\t\tbody.remove( x.start, x.valueStart );\n\t\t\t}\n\n\t\t\telse if ( x.node.declaration && ( name = x.node.declaration.name ) ) {\n\t\t\t\tif ( name === identifierReplacements.default ) {\n\t\t\t\t\tbody.remove( x.start, x.end );\n\t\t\t\t} else {\n\t\t\t\t\tlet original = hasOwnProp.call( identifierReplacements, name ) ? identifierReplacements[ name ] : name;\n\t\t\t\t\tbody.replace( x.start, x.end, `var ${identifierReplacements.default} = ${original};` );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tbody.replace( x.start, x.valueStart, `var ${identifierReplacements.default} = ` );\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ( x.hasDeclaration ) {\n\t\t\tif ( x.type === 'namedFunction' ) {\n\t\t\t\tshouldExportEarly[ x.name ] = true; // TODO what about `function foo () {}; export { foo }`?\n\t\t\t}\n\n\t\t\tbody.remove( x.start, x.valueStart );\n\t\t} else {\n\t\t\tbody.remove( x.start, x.next );\n\t\t}\n\t});\n\n\t// If this module exports a namespace - i.e. another module does\n\t// `import * from 'foo'` - then we need to make all this module's\n\t// exports available, using Object.defineProperty\n\tvar indentStr = body.getIndentString();\n\tif ( mod._exportsNamespace ) {\n\t\tlet namespaceExportBlock = `var ${mod.name} = {\\n`,\n\t\t\tnamespaceExports = [];\n\n\t\tmod.exports.forEach( x => {\n\t\t\tif ( x.hasDeclaration ) {\n\t\t\t\tnamespaceExports.push( indentStr + `get ${x.name} () { return ${identifierReplacements[x.name]}; }` );\n\t\t\t}\n\n\t\t\telse if ( x.isDefault ) {\n\t\t\t\tnamespaceExports.push( indentStr + `get default () { return ${identifierReplacements.default}; }` );\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tx.specifiers.forEach( s => {\n\t\t\t\t\tlet original = hasOwnProp.call( identifierReplacements, s.name ) ? identifierReplacements[ s.name ] : s.name;\n\t\t\t\t\tnamespaceExports.push( indentStr + `get ${s.as} () { return ${original}; }` );\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tnamespaceExportBlock += namespaceExports.join( ',\\n' ) + '\\n};\\n\\n';\n\n\t\tbody.prepend( namespaceExportBlock );\n\t}\n\n\t// If this module is responsible for one of the bundle's exports\n\t// (it doesn't have to be the entry module, which could re-export\n\t// a binding from another module), we write exports here\n\tif ( exportNames ) {\n\t\tlet exportBlock = [];\n\n\t\tObject.keys( exportNames ).forEach( name => {\n\t\t\tvar exportAs = exportNames[ name ];\n\t\t\texportBlock.push( `exports.${exportAs} = ${identifierReplacements[name]};` );\n\t\t});\n\n\t\tif ( exportBlock.length ) {\n\t\t\tbody.trim().append( '\\n\\n' + exportBlock.join( '\\n' ) );\n\t\t}\n\t}\n\n\treturn body.trim();\n}\n"
  },
  {
    "path": "src/bundler/getBundle.js",
    "content": "import { relative, resolve, sep } from 'path';\nimport hasOwnProp from 'utils/hasOwnProp';\nimport resolveId from 'utils/resolveId';\nimport promiseSequence from 'utils/promiseSequence';\nimport sortModules from './utils/sortModules';\nimport resolveChains from './utils/resolveChains';\nimport combine from './combine';\nimport { readFile, stat, Promise } from 'sander';\nimport getModule from './getModule';\n\nexport default function getBundle ( options ) {\n\tlet entry = options.entry.replace( /\\.js$/, '' );\n\tlet userModules = options.modules || {};\n\tlet modules = [];\n\tlet moduleLookup = {};\n\tlet promiseByPath = {};\n\tlet skip = options.skip;\n\tlet names = options.names;\n\tlet base = ( options.base ? resolve( options.base ) : process.cwd() ) + '/';\n\tlet externalModules = [];\n\tlet externalModuleLookup = {};\n\n\tif ( !entry.indexOf( base ) ) {\n\t\tentry = entry.substring( base.length );\n\t}\n\n\t// resolve user module paths\n\toptions.modules && Object.keys( options.modules ).forEach( relativePath => {\n\t\tuserModules[ resolve( base, relativePath ) ] = options.modules[ relativePath ];\n\t});\n\n\tlet cyclicalModules = [];\n\n\treturn resolvePath( base, userModules, entry, null ).then( absolutePath => {\n\t\treturn fetchModule( entry, absolutePath ).then( entryModule => {\n\t\t\treturn Promise.all( cyclicalModules ).then( () => {\n\t\t\t\t// if the bundle contains cyclical modules,\n\t\t\t\t// we may need to sort it again\n\t\t\t\tif ( cyclicalModules.length ) {\n\t\t\t\t\tmodules = sortModules( entryModule );\n\t\t\t\t}\n\n\t\t\t\tlet bundle = {\n\t\t\t\t\tentryModule,\n\t\t\t\t\tmodules,\n\t\t\t\t\texternalModules,\n\t\t\t\t\tnames\n\t\t\t\t};\n\n\t\t\t\tresolveChains( modules, moduleLookup );\n\t\t\t\tcombine( bundle );\n\n\t\t\t\treturn bundle;\n\t\t\t});\n\n\t\t});\n\t}, function ( err ) {\n\t\tif ( err.code === 'ENOENT' ) {\n\t\t\tthrow new Error( 'Could not find entry module (' + entry + ')' );\n\t\t}\n\n\t\tthrow err;\n\t});\n\n\tfunction fetchModule ( moduleId, absolutePath ) {\n\t\tif ( !hasOwnProp.call( promiseByPath, absolutePath ) ) {\n\t\t\tpromiseByPath[ absolutePath ] = (\n\t\t\t\thasOwnProp.call( userModules, absolutePath ) ?\n\t\t\t\t\tPromise.resolve( userModules[ absolutePath ] ) :\n\t\t\t\t\treadFile( absolutePath ).then( String )\n\t\t\t).then( function ( source ) {\n\t\t\t\tlet code, ast;\n\n\t\t\t\t// normalise\n\t\t\t\tif ( typeof source === 'object' ) {\n\t\t\t\t\tcode = source.code;\n\t\t\t\t\tast = source.ast;\n\t\t\t\t} else {\n\t\t\t\t\tcode = source;\n\t\t\t\t\tast = null;\n\t\t\t\t}\n\n\t\t\t\tif ( options.transform ) {\n\t\t\t\t\tcode = options.transform( code, absolutePath );\n\n\t\t\t\t\tif ( typeof code !== 'string' && !isThenable( code ) ) {\n\t\t\t\t\t\tthrow new Error( 'transform should return String or Promise' );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlet module = getModule({\n\t\t\t\t\tid: moduleId,\n\t\t\t\t\tpath: absolutePath,\n\t\t\t\t\tcode,\n\t\t\t\t\tast\n\t\t\t\t});\n\n\t\t\t\tmoduleLookup[ moduleId ] = module;\n\n\t\t\t\treturn promiseSequence( module.imports, x => {\n\t\t\t\t\tconst id = resolveId( x.path, module.path ).replace( base.replace(/\\\\/g, '/'), '' );\n\n\t\t\t\t\tif ( id === moduleId ) {\n\t\t\t\t\t\tthrow new Error( `A module (${moduleId}) cannot import itself` );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Some modules can be skipped\n\t\t\t\t\tif ( skip && ~skip.indexOf( id ) ) {\n\t\t\t\t\t\tconst skippedModule = {\n\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\tisSkipped: true\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tx.module = skippedModule;\n\t\t\t\t\t\treturn skippedModule;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn resolvePath( base, userModules, id, absolutePath, options.resolvePath ).then( absolutePath => {\n\t\t\t\t\t\tlet promise = hasOwnProp.call( promiseByPath, absolutePath ) && promiseByPath[ absolutePath ];\n\t\t\t\t\t\tlet cyclical = !!promise;\n\n\t\t\t\t\t\tif ( cyclical ) {\n\t\t\t\t\t\t\t// ensure all modules are set before we\n\t\t\t\t\t\t\t// create the bundle...\n\t\t\t\t\t\t\tcyclicalModules.push(\n\t\t\t\t\t\t\t\tpromise.then( module => x.module = module )\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t// ...then short-circuit\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn fetchModule( id, absolutePath ).then( module => x.module = module );\n\t\t\t\t\t}, function handleError ( err ) {\n\t\t\t\t\t\tif ( err.code === 'ENOENT' ) {\n\t\t\t\t\t\t\t// Most likely an external module\n\t\t\t\t\t\t\tlet externalModule = hasOwnProp.call( externalModuleLookup, id ) && externalModuleLookup[ id ];\n\n\t\t\t\t\t\t\tif ( !externalModule ) {\n\t\t\t\t\t\t\t\texternalModule = {\n\t\t\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\t\t\tisExternal: true\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\texternalModules.push( externalModule );\n\t\t\t\t\t\t\t\texternalModuleLookup[ id ] = externalModule;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tx.module = externalModule;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow err;\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t})\n\t\t\t\t.then( () => modules.push( module ) )\n\t\t\t\t.then( () => module );\n\t\t\t});\n\t\t}\n\n\t\treturn promiseByPath[ absolutePath ];\n\t}\n}\n\nfunction resolvePath ( base, userModules, moduleId, importerPath, resolver ) {\n\tconst noExt = moduleId.replace( /\\.js$/, '' );\n\n\treturn tryPath( base, noExt + '.js', userModules )\n\t\t.catch( () => tryPath( base, noExt + sep + 'index.js', userModules ) )\n\t\t.catch( function ( err ) {\n\t\t\tconst resolvedPromise = resolver && Promise.resolve( resolver( moduleId, importerPath ) );\n\n\t\t\tif ( resolvedPromise ) {\n\t\t\t\treturn resolvedPromise.then( resolvedPath => {\n\t\t\t\t\tif ( !resolvedPath ) {\n\t\t\t\t\t\t// hack but whatevs, it saves handling real ENOENTs differently\n\t\t\t\t\t\tlet err = new Error();\n\t\t\t\t\t\terr.code = 'ENOENT';\n\t\t\t\t\t\tthrow err;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn stat( resolvedPath ).then( () => resolve( base, resolvedPath ) );\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t});\n}\n\nfunction tryPath ( base, filename, userModules ) {\n\tconst absolutePath = resolve( base, filename );\n\n\tif ( hasOwnProp.call( userModules, absolutePath ) ) {\n\t\treturn Promise.resolve( absolutePath );\n\t}\n\treturn stat( absolutePath ).then( () => absolutePath );\n}\n\nfunction isThenable ( obj ) {\n\treturn obj && typeof obj.then === 'function';\n}\n"
  },
  {
    "path": "src/bundler/getModule.js",
    "content": "import { parse } from 'acorn';\nimport MagicString from 'magic-string';\nimport findImportsAndExports from 'utils/ast/findImportsAndExports';\nimport annotateAst from 'utils/ast/annotate';\nimport disallowConflictingImports from '../utils/disallowConflictingImports';\n\nexport default function getModule ( mod ) {\n\tmod.body = new MagicString( mod.code );\n\n\tlet toRemove = [];\n\tlet comments = [];\n\n\ttry {\n\t\tmod.ast = mod.ast || ( parse( mod.code, {\n\t\t\tecmaVersion: 6,\n\t\t\tsourceType: 'module',\n\t\t\tonComment ( block, text, start, end ) {\n\t\t\t\t// sourceMappingURL comments should be removed\n\t\t\t\tif ( !block && /^# sourceMappingURL=/.test( text ) ) {\n\t\t\t\t\ttoRemove.push({ start, end });\n\t\t\t\t} else {\n\t\t\t\t\tcomments.push({ start, end });\n\t\t\t\t}\n\t\t\t}\n\t\t}));\n\t} catch ( err ) {\n\t\t// If there's a parse error, attach file info\n\t\t// before throwing the error\n\t\tif ( err.loc ) {\n\t\t\terr.file = mod.path;\n\t\t}\n\n\t\tthrow err;\n\t}\n\n\t// remove sourceMappingURL comments\n\ttoRemove.forEach( ({ start, end }) => mod.body.remove( start, end ) );\n\n\tlet { imports, exports, defaultExport } = findImportsAndExports( mod.ast, mod.code, comments );\n\n\tdisallowConflictingImports( imports );\n\n\tmod.imports = imports;\n\tmod.exports = exports;\n\tmod.defaultExport = defaultExport;\n\n\tconst defaultExportIdentifier = defaultExport &&\n\t                                defaultExport.type === 'expression' &&\n\t                                defaultExport.node.declaration &&\n\t                                defaultExport.node.declaration.type === 'Identifier' &&\n\t                                defaultExport.node.declaration;\n\n\t// if the default export is an expression like `export default foo`, we\n\t// can *probably* just use `foo` to refer to said export throughout the\n\t// bundle. Tracking assignments to `foo` allows us to be sure that that's\n\t// the case (i.e. that the module doesn't assign a different value to foo\n\t// after it's been exported)\n\tannotateAst( mod.ast, {\n\t\ttrackAssignments: defaultExportIdentifier\n\t});\n\n\tif ( defaultExportIdentifier && defaultExportIdentifier._assignments ) {\n\t\tlet i = defaultExportIdentifier._assignments.length;\n\t\twhile ( i-- ) {\n\t\t\tconst assignment = defaultExportIdentifier._assignments[i];\n\n\t\t\t// if either a) the assignment happens inside a function body, or\n\t\t\t// b) it happens after the `export default ...`, then it's unsafe to\n\t\t\t// use the identifier, and we need to essentially do `var _foo = foo`\n\t\t\tif ( assignment.scope.parent || assignment.node.start > defaultExport.start ) {\n\t\t\t\tdefaultExport.unsafe = true; // TODO better property name than 'unsafe'\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// identifiers to replace within this module\n\t// (gets filled in later, once bundle is combined)\n\tmod.identifierReplacements = {};\n\n\t// collect exports by name, for quick lookup when verifying\n\t// that this module exports a given identifier\n\tmod.doesExport = {};\n\n\texports.forEach( x => {\n\t\tif ( x.isDefault ) {\n\t\t\tmod.doesExport.default = true;\n\t\t}\n\n\t\telse if ( x.name ) {\n\t\t\tmod.doesExport[ x.name ] = true;\n\t\t}\n\n\t\telse if ( x.specifiers ) {\n\t\t\tx.specifiers.forEach( s => {\n\t\t\t\tmod.doesExport[ s.as ] = true;\n\t\t\t});\n\t\t}\n\n\t\telse {\n\t\t\tthrow new Error( 'Unexpected export type' );\n\t\t}\n\t});\n\n\treturn mod;\n}\n"
  },
  {
    "path": "src/bundler/utils/resolveChains.js",
    "content": "import hasOwnProp from 'utils/hasOwnProp';\n\n/**\n * Discovers 'chains' within a bundle - e.g. `import { foo } from 'foo'`\n   may be equivalent to `import { bar } from 'bar'`, if foo.js imports `bar`\n   and re-exports it as `foo`. Where applicable, import/export specifiers\n   are augmented with an `origin: { module, name }` property\n * @param {array} modules - the bundle's array of modules\n * @param {object} moduleLookup - modules indexed by their ID\n */\nexport default function resolveChains ( modules, moduleLookup ) {\n\tlet chains = {};\n\n\t// First pass - resolving intra-module chains\n\tmodules.forEach( mod => {\n\t\tvar origin = {};\n\n\t\tmod.imports.forEach( x => {\n\t\t\tconst imported = x.module;\n\n\t\t\tx.specifiers.forEach( s => {\n\t\t\t\tif ( s.isBatch ) {\n\t\t\t\t\t// tell that module that it needs to export an object full of getters\n\t\t\t\t\timported._exportsNamespace = true;\n\t\t\t\t\treturn; // TODO can batch imports be chained?\n\t\t\t\t}\n\n\t\t\t\torigin[ s.as ] = `${s.name}@${imported.id}`;\n\t\t\t});\n\t\t});\n\n\t\tmod.exports.forEach( x => {\n\t\t\tif ( !x.specifiers ) return;\n\n\t\t\tx.specifiers.forEach( s => {\n\t\t\t\tif ( hasOwnProp.call( origin, s.name ) ) {\n\t\t\t\t\tchains[ `${s.as}@${mod.id}` ] = origin[ s.name ];\n\t\t\t\t} else if ( s.as !== s.name ) {\n\t\t\t\t\tchains[ `${s.as}@${mod.id}` ] = `${s.name}@${mod.id}`;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t});\n\n\t// Second pass - assigning origins to specifiers\n\tmodules.forEach( mod => {\n\t\tmod.imports.forEach( x => {\n\t\t\tconst imported = x.module;\n\n\t\t\tx.specifiers.forEach( s => {\n\t\t\t\tif ( s.isBatch ) {\n\t\t\t\t\treturn; // TODO can batch imports be chained?\n\t\t\t\t}\n\n\t\t\t\tsetOrigin( s, `${s.name}@${imported.id}`, chains, moduleLookup );\n\t\t\t});\n\t\t});\n\n\t\tmod.exports.forEach( x => {\n\t\t\tif ( !x.specifiers ) return;\n\n\t\t\tx.specifiers.forEach( s => {\n\t\t\t\tsetOrigin( s, `${s.as}@${mod.id}`, chains, moduleLookup );\n\t\t\t});\n\t\t});\n\t});\n}\n\nfunction setOrigin ( specifier, hash, chains, moduleLookup ) {\n\tlet isChained;\n\n\twhile ( hasOwnProp.call( chains, hash ) ) {\n\t\thash = chains[ hash ];\n\t\tisChained = true;\n\t}\n\n\tif ( isChained ) {\n\t\tconst [ name, moduleId ] = hash.split( '@' );\n\t\tspecifier.origin = { module: moduleLookup[ moduleId ], name };\n\t}\n}\n"
  },
  {
    "path": "src/bundler/utils/sortModules.js",
    "content": "import hasOwnProp from 'utils/hasOwnProp';\nimport walk from 'utils/ast/walk';\n\n/**\n * Sorts an array of modules such that dependencies come before\n   their dependents, handling complex cases of cyclical dependencies\n * @param {object} entry - the bundle's 'entry module'\n * @returns {array} - the sorted module list\n */\nexport default function sortModules ( entry ) {\n\tlet seen = {};\n\tlet ordered = [];\n\tlet hasCycles;\n\n\tlet strongDeps = {};\n\tlet stronglyDependsOn = {};\n\n\tfunction visit ( mod ) {\n\t\tconst { id } = mod;\n\n\t\tseen[ id ] = true;\n\n\t\tstrongDeps[ id ] = [];\n\t\tstronglyDependsOn[ id ] = {};\n\n\t\tmod.imports.forEach( x => {\n\t\t\tconst imported = x.module;\n\n\t\t\tif ( imported.isExternal || imported.isSkipped ) return;\n\n\t\t\t// if `mod` references a binding from `imported` at the top\n\t\t\t// level (i.e. outside function bodies), we say that `mod`\n\t\t\t// strongly depends on `imported. If two modules depend on\n\t\t\t// each other, this helps us order them such that if a\n\t\t\t// strongly depends on b, and b weakly depends on a, b\n\t\t\t// goes first\n\t\t\tif ( referencesAtTopLevel( mod, imported ) ) {\n\t\t\t\tstrongDeps[ id ].push( imported );\n\t\t\t}\n\n\t\t\tif ( hasOwnProp.call( seen, imported.id ) ) {\n\t\t\t\t// we need to prevent an infinite loop, and note that\n\t\t\t\t// we need to check for strong/weak dependency relationships\n\t\t\t\thasCycles = true;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvisit( imported );\n\t\t});\n\n\t\t// add second (and third...) order dependencies\n\t\tfunction addStrongDependencies ( dependency ) {\n\t\t\tif ( hasOwnProp.call( stronglyDependsOn[ id ], dependency.id ) ) return;\n\n\t\t\tstronglyDependsOn[ id ][ dependency.id ] = true;\n\t\t\tstrongDeps[ dependency.id ].forEach( addStrongDependencies );\n\t\t}\n\n\t\tstrongDeps[ id ].forEach( addStrongDependencies );\n\n\t\tordered.push( mod );\n\t}\n\n\tvisit( entry );\n\n\tlet unordered;\n\n\tif ( hasCycles ) {\n\t\tunordered = ordered;\n\t\tordered = [];\n\n\t\t// unordered is actually semi-ordered, as [ fewer dependencies ... more dependencies ]\n\t\tunordered.forEach( x => {\n\t\t\t// ensure strong dependencies of x that don't strongly depend on x go first\n\t\t\tstrongDeps[ x.id ].forEach( place );\n\n\t\t\tfunction place ( dep ) {\n\t\t\t\tif ( !stronglyDependsOn[ dep.id ][ x.id ] && !~ordered.indexOf( dep ) ) {\n\t\t\t\t\tstrongDeps[ dep.id ].forEach( place );\n\t\t\t\t\tordered.push( dep );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !~ordered.indexOf( x ) ) {\n\t\t\t\tordered.push( x );\n\t\t\t}\n\t\t});\n\t}\n\n\treturn ordered;\n}\n\nfunction referencesAtTopLevel ( a, b ) {\n\tlet bindings = [];\n\n\t// find out which bindings a imports from b\n\tlet i = a.imports.length;\n\twhile ( i-- ) {\n\t\tif ( a.imports[i].module === b ) {\n\t\t\tbindings.push.apply( bindings, a.imports[i].specifiers.map( x => x.as ) );\n\t\t}\n\t}\n\n\t// see if any of those bindings are referenced at the top level\n\tlet referencedAtTopLevel = false;\n\n\twalk( a.ast, {\n\t\tenter ( node ) {\n\t\t\tif ( /^Import/.test( node.type ) || ( node._scope && node._scope.parent ) ) {\n\t\t\t\treturn this.skip();\n\t\t\t}\n\n\t\t\tif ( node.type === 'Identifier' && ~bindings.indexOf( node.name ) ) {\n\t\t\t\treferencedAtTopLevel = true;\n\t\t\t\tthis.abort();\n\t\t\t}\n\t\t}\n\t});\n\n\treturn referencedAtTopLevel;\n}"
  },
  {
    "path": "src/esperanto.js",
    "content": "import chalk from 'chalk';\nimport hasNamedImports from 'utils/hasNamedImports';\nimport hasNamedExports from 'utils/hasNamedExports';\nimport getStandaloneModule from 'standalone/getModule';\nimport getBundle from 'bundler/getBundle';\nimport moduleBuilders from 'standalone/builders';\nimport bundleBuilders from 'bundler/builders';\nimport concat from 'bundler/builders/concat';\nimport { getName } from 'utils/mappers';\n\nlet deprecateMessages = {\n\tdefaultOnly: 'options.defaultOnly has been deprecated, and is now standard behaviour. To use named imports/exports, pass `strict: true`.',\n\tstandalone: chalk.red.bold( '[DEPRECATION NOTICE] Esperanto is no longer under active development. To convert an ES6 module to another format, consider using Babel (https://babeljs.io)' ),\n\tbundle: chalk.red.bold( '[DEPRECATION NOTICE] Esperanto is no longer under active development. To bundle ES6 modules, consider using Rollup (https://github.com/rollup/rollup). See https://github.com/rollup/rollup/wiki/Migrating-from-Esperanto for help migrating' )\n};\n\nlet alreadyWarned = {\n\tdefaultOnly: false,\n\tstandalone: false,\n\tbundle: false\n};\n\nfunction transpileMethod ( format ) {\n\tif ( !alreadyWarned.standalone ) {\n\t\tconsole.error( deprecateMessages.standalone );\n\t\talreadyWarned.standalone = true;\n\t}\n\n\treturn function ( source, options = {} ) {\n\t\tlet mod = getStandaloneModule({\n\t\t\tsource,\n\t\t\tgetModuleName: options.getModuleName,\n\t\t\tstrict: options.strict\n\t\t});\n\n\t\tif ( 'defaultOnly' in options && !alreadyWarned.defaultOnly ) {\n\t\t\t// TODO link to a wiki page explaining this, or something\n\t\t\tconsole.error( deprecateMessages.defaultOnly );\n\t\t\talreadyWarned.defaultOnly = true;\n\t\t}\n\n\t\tif ( options.absolutePaths && !options.amdName ) {\n\t\t\tthrow new Error( 'You must specify an `amdName` in order to use the `absolutePaths` option' );\n\t\t}\n\n\t\tlet builder;\n\n\t\tif ( !options.strict ) {\n\t\t\t// ensure there are no named imports/exports. TODO link to a wiki page...\n\t\t\tif ( hasNamedImports( mod ) || hasNamedExports( mod ) ) {\n\t\t\t\tthrow new Error( 'You must be in strict mode (pass `strict: true`) to use named imports or exports' );\n\t\t\t}\n\n\t\t\tbuilder = moduleBuilders.defaultsMode[ format ];\n\t\t} else {\n\t\t\tbuilder = moduleBuilders.strictMode[ format ];\n\t\t}\n\n\t\treturn builder( mod, options );\n\t};\n}\n\nexport const toAmd = transpileMethod( 'amd' );\nexport const toCjs = transpileMethod( 'cjs' );\nexport const toUmd = transpileMethod( 'umd' );\n\nexport function bundle ( options ) {\n\tif ( !alreadyWarned.bundle ) {\n\t\tconsole.error( deprecateMessages.bundle );\n\t\talreadyWarned.bundle = true;\n\t}\n\n\treturn getBundle( options ).then( function ( bundle ) {\n\t\treturn {\n\t\t\timports: bundle.externalModules.map( mod => mod.id ),\n\t\t\texports: flattenExports( bundle.entryModule.exports ),\n\n\t\t\ttoAmd: options => transpile( 'amd', options ),\n\t\t\ttoCjs: options => transpile( 'cjs', options ),\n\t\t\ttoUmd: options => transpile( 'umd', options ),\n\n\t\t\tconcat: options => concat( bundle, options || {} )\n\t\t};\n\n\t\tfunction transpile ( format, options = {} ) {\n\t\t\tif ( 'defaultOnly' in options && !alreadyWarned.defaultOnly ) {\n\t\t\t\t// TODO link to a wiki page explaining this, or something\n\t\t\t\tconsole.error( deprecateMessages.defaultOnly );\n\t\t\t\talreadyWarned.defaultOnly = true;\n\t\t\t}\n\n\t\t\tlet builder;\n\n\t\t\tif ( !options.strict ) {\n\t\t\t\t// ensure there are no named imports/exports\n\t\t\t\tif ( hasNamedExports( bundle.entryModule ) ) {\n\t\t\t\t\tthrow new Error( 'Entry module can only have named exports in strict mode (pass `strict: true`)' );\n\t\t\t\t}\n\n\t\t\t\tbundle.modules.forEach( mod => {\n\t\t\t\t\tmod.imports.forEach( x => {\n\t\t\t\t\t\tif ( x.module.isExternal && ( !x.isDefault && !x.isBatch ) ) {\n\t\t\t\t\t\t\tthrow new Error( 'You can only have named external imports in strict mode (pass `strict: true`)' );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\tbuilder = bundleBuilders.defaultsMode[ format ];\n\t\t\t} else {\n\t\t\t\tbuilder = bundleBuilders.strictMode[ format ];\n\t\t\t}\n\n\t\t\treturn builder( bundle, options );\n\t\t}\n\t});\n}\n\nfunction flattenExports ( exports ) {\n\tlet flattened = [];\n\n\texports.forEach( x => {\n\t\tif ( x.isDefault ) {\n\t\t\tflattened.push( 'default' );\n\t\t}\n\n\t\telse if ( x.name ) {\n\t\t\tflattened.push( x.name );\n\t\t}\n\n\t\telse if ( x.specifiers ) {\n\t\t\tflattened.push.apply( flattened, x.specifiers.map( x => x.as ) );\n\t\t}\n\t});\n\n\treturn flattened;\n}\n"
  },
  {
    "path": "src/standalone/builders/defaultsMode/amd.js",
    "content": "import transformExportDeclaration from './utils/transformExportDeclaration';\nimport packageResult from 'utils/packageResult';\nimport amdIntro from '../../../utils/amd/amdIntro';\n\nexport default function amd ( mod, options ) {\n\tmod.imports.forEach( x => {\n\t\tmod.body.remove( x.start, x.next );\n\t});\n\n\ttransformExportDeclaration( mod.exports[0], mod.body );\n\n\tlet intro = amdIntro({\n\t\tname: options.amdName,\n\t\timports: mod.imports,\n\t\tabsolutePaths: options.absolutePaths,\n\t\tindentStr: mod.body.getIndentString(),\n\t\tuseStrict: options.useStrict !== false\n\t});\n\n\tmod.body.trim()\n\t\t.indent()\n\t\t.prepend( intro )\n\t\t.trim()\n\t\t.append( '\\n\\n});' );\n\n\treturn packageResult( mod, mod.body, options, 'toAmd' );\n}\n"
  },
  {
    "path": "src/standalone/builders/defaultsMode/cjs.js",
    "content": "import hasOwnProp from 'utils/hasOwnProp';\nimport packageResult from 'utils/packageResult';\nimport { req } from 'utils/mappers';\n\nexport default function cjs ( mod, options ) {\n\tlet seen = {};\n\n\tmod.imports.forEach( x => {\n\t\tif ( !hasOwnProp.call( seen, x.path ) ) {\n\t\t\tlet replacement = x.isEmpty ? `${req(x.path)};` : `var ${x.as} = ${req(x.path)};`;\n\t\t\tmod.body.replace( x.start, x.end, replacement );\n\n\t\t\tseen[ x.path ] = true;\n\t\t} else {\n\t\t\tmod.body.remove( x.start, x.next );\n\t\t}\n\t});\n\n\tlet exportDeclaration = mod.exports[0];\n\n\tif ( exportDeclaration ) {\n\t\tswitch ( exportDeclaration.type ) {\n\t\t\tcase 'namedFunction':\n\t\t\tcase 'namedClass':\n\t\t\t\tmod.body.remove( exportDeclaration.start, exportDeclaration.valueStart );\n\t\t\t\tmod.body.replace( exportDeclaration.end, exportDeclaration.end, `\\nmodule.exports = ${exportDeclaration.name};` );\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tmod.body.replace( exportDeclaration.start, exportDeclaration.valueStart, 'module.exports = ' );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tif ( options.useStrict !== false ) {\n\t\tmod.body.prepend( \"'use strict';\\n\\n\" ).trimLines();\n\t}\n\n\treturn packageResult( mod, mod.body, options, 'toCjs' );\n}\n"
  },
  {
    "path": "src/standalone/builders/defaultsMode/index.js",
    "content": "import amd from './amd';\nimport cjs from './cjs';\nimport umd from './umd';\n\nexport default {\n\tamd: amd,\n\tcjs: cjs,\n\tumd: umd\n};\n"
  },
  {
    "path": "src/standalone/builders/defaultsMode/umd.js",
    "content": "import transformExportDeclaration from './utils/transformExportDeclaration';\nimport packageResult from 'utils/packageResult';\nimport umdIntro from 'utils/umd/umdIntro';\nimport requireName from 'utils/umd/requireName';\n\nexport default function umd ( mod, options ) {\n\trequireName( options );\n\n\tmod.imports.forEach( x => {\n\t\tmod.body.remove( x.start, x.next );\n\t});\n\n\tlet intro = umdIntro({\n\t\thasExports: mod.exports.length > 0,\n\t\timports: mod.imports,\n\t\tamdName: options.amdName,\n\t\tabsolutePaths: options.absolutePaths,\n\t\tname: options.name,\n\t\tindentStr: mod.body.getIndentString(),\n\t\tuseStrict: options.useStrict !== false\n\t});\n\n\ttransformExportDeclaration( mod.exports[0], mod.body );\n\n\tmod.body.indent().prepend( intro ).trimLines().append( '\\n\\n}));' );\n\n\treturn packageResult( mod, mod.body, options, 'toUmd' );\n}\n"
  },
  {
    "path": "src/standalone/builders/defaultsMode/utils/transformExportDeclaration.js",
    "content": "export default function transformExportDeclaration ( declaration, body ) {\n\tif ( !declaration ) {\n\t\treturn;\n\t}\n\n\tlet exportedValue;\n\n\tswitch ( declaration.type ) {\n\t\tcase 'namedFunction':\n\t\tcase 'namedClass':\n\t\t\tbody.remove( declaration.start, declaration.valueStart );\n\t\t\texportedValue = declaration.name;\n\t\t\tbreak;\n\n\t\tcase 'anonFunction':\n\t\tcase 'anonClass':\n\t\t\tif ( declaration.isFinal ) {\n\t\t\t\tbody.replace( declaration.start, declaration.valueStart, 'return ' );\n\t\t\t} else {\n\t\t\t\tbody.replace( declaration.start, declaration.valueStart, 'var __export = ' );\n\t\t\t\texportedValue = '__export';\n\t\t\t}\n\n\t\t\t// add semi-colon, if necessary\n\t\t\t// TODO body.original is an implementation detail of magic-string - there\n\t\t\t// should probably be an API for this sort of thing\n\t\t\tif ( body.original[ declaration.end - 1 ] !== ';' ) {\n\t\t\t\tbody.insert( declaration.end, ';' );\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\tcase 'expression':\n\t\t\tbody.remove( declaration.start, declaration.next );\n\t\t\texportedValue = declaration.value;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tthrow new Error( `Unexpected export type '${declaration.type}'` );\n\t}\n\n\tif ( exportedValue ) {\n\t\tbody.append( `\\nreturn ${exportedValue};` );\n\t}\n}\n"
  },
  {
    "path": "src/standalone/builders/index.js",
    "content": "// TODO rewrite with named imports/exports\nimport defaultsMode from './defaultsMode';\nimport strictMode from './strictMode';\n\nexport default {\n\tdefaultsMode: defaultsMode,\n\tstrictMode: strictMode\n};\n"
  },
  {
    "path": "src/standalone/builders/strictMode/amd.js",
    "content": "import packageResult from '../../../utils/packageResult';\nimport transformBody from './utils/transformBody';\nimport amdIntro from '../../../utils/amd/amdIntro';\n\nexport default function amd ( mod, options ) {\n\tlet intro = amdIntro({\n\t\tname: options.amdName,\n\t\tabsolutePaths: options.absolutePaths,\n\t\timports: mod.imports,\n\t\tindentStr: mod.body.getIndentString(),\n\t\thasExports: mod.exports.length,\n\t\tuseStrict: options.useStrict !== false\n\t});\n\n\ttransformBody( mod, mod.body, {\n\t\tintro,\n\t\toutro: '\\n\\n});',\n\t\t_evilES3SafeReExports: options._evilES3SafeReExports\n\t});\n\n\treturn packageResult( mod, mod.body, options, 'toAmd' );\n}\n"
  },
  {
    "path": "src/standalone/builders/strictMode/cjs.js",
    "content": "import packageResult from 'utils/packageResult';\nimport hasOwnProp from 'utils/hasOwnProp';\nimport transformBody from './utils/transformBody';\nimport { req } from 'utils/mappers';\n\nexport default function cjs ( mod, options ) {\n\tlet seen = {};\n\n\t// Create block of require statements\n\tlet importBlock = mod.imports.map( x => {\n\t\tif ( !hasOwnProp.call( seen, x.path ) ) {\n\t\t\tseen[ x.path ] = true;\n\n\t\t\tif ( x.isEmpty ) {\n\t\t\t\treturn `${req(x.path)};`;\n\t\t\t}\n\n\t\t\treturn `var ${x.name} = ${req(x.path)};`;\n\t\t}\n\t}).filter( Boolean ).join( '\\n' );\n\n\ttransformBody( mod, mod.body, {\n\t\theader: importBlock,\n\t\t_evilES3SafeReExports: options._evilES3SafeReExports\n\t});\n\n\tif ( options.useStrict !== false ) {\n\t\tmod.body.prepend( \"'use strict';\\n\\n\" ).trimLines();\n\t}\n\n\treturn packageResult( mod, mod.body, options, 'toCjs' );\n}\n"
  },
  {
    "path": "src/standalone/builders/strictMode/index.js",
    "content": "import amd from './amd';\nimport cjs from './cjs';\nimport umd from './umd';\n\nexport default {\n\tamd: amd,\n\tcjs: cjs,\n\tumd: umd\n};\n"
  },
  {
    "path": "src/standalone/builders/strictMode/umd.js",
    "content": "import packageResult from 'utils/packageResult';\nimport umdIntro from 'utils/umd/umdIntro';\nimport requireName from 'utils/umd/requireName';\nimport transformBody from './utils/transformBody';\n\nexport default function umd ( mod, options ) {\n\trequireName( options );\n\n\tlet intro = umdIntro({\n\t\thasExports: mod.exports.length > 0,\n\t\timports: mod.imports,\n\t\tamdName: options.amdName,\n\t\tabsolutePaths: options.absolutePaths,\n\t\tname: options.name,\n\t\tindentStr: mod.body.getIndentString(),\n\t\tstrict: true,\n\t\tuseStrict: options.useStrict !== false\n\t});\n\n\ttransformBody( mod, mod.body, {\n\t\tintro: intro,\n\t\toutro: '\\n\\n}));',\n\t\t_evilES3SafeReExports: options._evilES3SafeReExports\n\t});\n\n\treturn packageResult( mod, mod.body, options, 'toUmd' );\n}\n"
  },
  {
    "path": "src/standalone/builders/strictMode/utils/gatherImports.js",
    "content": "export default function gatherImports ( imports ) {\n\tlet chains = {};\n\tlet identifierReplacements = {};\n\n\timports.forEach( x => {\n\t\tx.specifiers.forEach( s => {\n\t\t\tif ( s.isBatch ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet name = s.as;\n\t\t\tlet replacement = x.name + ( s.isDefault ? `['default']` : `.${s.name}` );\n\n\t\t\tif ( !x.passthrough ) {\n\t\t\t\tidentifierReplacements[ name ] = replacement;\n\t\t\t}\n\n\t\t\tchains[ name ] = replacement;\n\t\t});\n\t});\n\n\treturn [ chains, identifierReplacements ];\n}\n"
  },
  {
    "path": "src/standalone/builders/strictMode/utils/getExportNames.js",
    "content": "export default function getExportNames ( exports ) {\n\tvar result = {};\n\n\texports.forEach( x => {\n\t\tif ( x.isDefault ) return;\n\n\t\tif ( x.hasDeclaration ) {\n\t\t\tresult[ x.name ] = x.name;\n\t\t\treturn;\n\t\t}\n\n\t\tx.specifiers.forEach( s => {\n\t\t\tresult[ s.name ] = s.as;\n\t\t});\n\t});\n\n\treturn result;\n}\n"
  },
  {
    "path": "src/standalone/builders/strictMode/utils/getImportSummary.js",
    "content": "import hasOwnProp from 'utils/hasOwnProp';\n\nexport default function getImportSummary ( mod ) {\n\tlet importPaths = [];\n\tlet importNames = [];\n\tlet seen = {};\n\tlet placeholders = 0;\n\n\tmod.imports.forEach( x => {\n\t\tif ( !hasOwnProp.call( seen, x.path ) ) {\n\t\t\timportPaths.push( x.path );\n\n\t\t\tif ( x.specifiers.length ) {\n\t\t\t\twhile ( placeholders ) {\n\t\t\t\t\timportNames.push( `__dep${importNames.length}__` );\n\t\t\t\t\tplaceholders--;\n\t\t\t\t}\n\t\t\t\timportNames.push( x.name );\n\t\t\t} else {\n\t\t\t\tplaceholders++;\n\t\t\t}\n\n\t\t\tseen[ x.path ] = true;\n\t\t}\n\t});\n\n\treturn [ importPaths, importNames ];\n}\n"
  },
  {
    "path": "src/standalone/builders/strictMode/utils/transformBody.js",
    "content": "import gatherImports from './gatherImports';\nimport getExportNames from './getExportNames';\nimport getReadOnlyIdentifiers from 'utils/getReadOnlyIdentifiers';\nimport traverseAst from 'utils/ast/traverse';\nimport hasOwnProp from 'utils/hasOwnProp';\n\nexport default function transformBody ( mod, body, options ) {\n\tlet [ chains, identifierReplacements ] = gatherImports( mod.imports );\n\tlet exportNames = getExportNames( mod.exports );\n\n\tlet [ importedBindings, importedNamespaces ] = getReadOnlyIdentifiers( mod.imports );\n\n\t// ensure no conflict with `exports`\n\tidentifierReplacements.exports = deconflict( 'exports', mod.ast._declared );\n\n\ttraverseAst( mod.ast, body, identifierReplacements, importedBindings, importedNamespaces, exportNames );\n\n\t// Remove import statements from the body of the module\n\tmod.imports.forEach( x => {\n\t\tbody.remove( x.start, x.next );\n\t});\n\n\t// Prepend require() statements (CommonJS output only)\n\tif ( options.header ) {\n\t\tbody.prepend( options.header + '\\n\\n' );\n\t}\n\n\t// Remove export statements (but keep declarations)\n\tmod.exports.forEach( x => {\n\t\tif ( x.isDefault ) {\n\t\t\tif ( /^named/.test( x.type ) ) {\n\t\t\t\t// export default function answer () { return 42; }\n\t\t\t\tbody.remove( x.start, x.valueStart );\n\t\t\t\tbody.insert( x.end, `\\nexports['default'] = ${x.name};` );\n\t\t\t} else {\n\t\t\t\t// everything else\n\t\t\t\tbody.replace( x.start, x.valueStart, 'exports[\\'default\\'] = ' );\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\tswitch ( x.type ) {\n\t\t\t\tcase 'varDeclaration': // export var answer = 42; (or let)\n\t\t\t\tcase 'namedFunction':  // export function answer () {...}\n\t\t\t\tcase 'namedClass':     // export class answer {...}\n\t\t\t\t\tbody.remove( x.start, x.valueStart );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'named':          // export { foo, bar };\n\t\t\t\t\tbody.remove( x.start, x.next );\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tbody.replace( x.start, x.valueStart, 'exports[\\'default\\'] = ' );\n\t\t\t}\n\t\t}\n\t});\n\n\t// Append export block (this is the same for all module types, unlike imports)\n\tlet earlyExports = [];\n\tlet lateExports = [];\n\n\tObject.keys( exportNames ).forEach( name => {\n\t\tvar exportAs = exportNames[ name ];\n\n\t\tif ( chains.hasOwnProperty( name ) ) {\n\t\t\t// special case - a binding from another module\n\t\t\tif ( !options._evilES3SafeReExports ) {\n\t\t\t\tearlyExports.push( `Object.defineProperty(exports, '${exportAs}', { enumerable: true, get: function () { return ${chains[name]}; }});` );\n\t\t\t} else {\n\t\t\t\tlet exportSegment = exportAs === 'default' ? \"['default']\" : `.${exportAs}`;\n\t\t\t\tlateExports.push( `exports${exportSegment} = ${chains[name]};` );\n\t\t\t}\n\t\t} else if ( ~mod.ast._topLevelFunctionNames.indexOf( name ) ) {\n\t\t\t// functions should be exported early, in\n\t\t\t// case of cyclic dependencies\n\t\t\tearlyExports.push( `exports.${exportAs} = ${name};` );\n\t\t} else {\n\t\t\tlateExports.push( `exports.${exportAs} = ${name};` );\n\t\t}\n\t});\n\n\t// Function exports should be exported immediately after 'use strict'\n\tif ( earlyExports.length ) {\n\t\tbody.trim().prepend( earlyExports.join( '\\n' ) + '\\n\\n' );\n\t}\n\n\t// Everything else should be exported at the end\n\tif ( lateExports.length ) {\n\t\tbody.trim().append( '\\n\\n' + lateExports.join( '\\n' ) );\n\t}\n\n\tif ( options.intro && options.outro ) {\n\t\tbody.indent().prepend( options.intro ).trimLines().append( options.outro );\n\t}\n}\n\nfunction deconflict ( name, declared ) {\n\twhile ( hasOwnProp.call( declared, name ) ) {\n\t\tname = '_' + name;\n\t}\n\n\treturn name;\n}\n"
  },
  {
    "path": "src/standalone/getModule.js",
    "content": "import { parse } from 'acorn';\nimport MagicString from 'magic-string';\nimport annotateAst from 'utils/ast/annotate';\nimport findImportsAndExports from 'utils/ast/findImportsAndExports';\nimport getUnscopedNames from 'utils/ast/getUnscopedNames';\nimport disallowConflictingImports from '../utils/disallowConflictingImports';\nimport hasOwnProp from 'utils/hasOwnProp';\nimport { default as sanitize, splitPath } from 'utils/sanitize';\n\nconst SOURCEMAPPINGURL_REGEX = /^# sourceMappingURL=/;\n\nexport default function getStandaloneModule ( options ) {\n\tlet code, ast;\n\n\tif ( typeof options.source === 'object' ) {\n\t\tcode = options.source.code;\n\t\tast = options.source.ast;\n\t} else {\n\t\tcode = options.source;\n\t}\n\n\tlet toRemove = [];\n\tlet comments = [];\n\n\tlet mod = {\n\t\tbody: new MagicString( code ),\n\t\tast: ast || ( parse( code, {\n\t\t\tecmaVersion: 6,\n\t\t\tsourceType: 'module',\n\t\t\tonComment ( block, text, start, end ) {\n\t\t\t\t// sourceMappingURL comments should be removed\n\t\t\t\tif ( !block && SOURCEMAPPINGURL_REGEX.test( text ) ) {\n\t\t\t\t\ttoRemove.push({ start, end });\n\t\t\t\t} else {\n\t\t\t\t\tcomments.push({ start, end });\n\t\t\t\t}\n\t\t\t}\n\t\t}))\n\t};\n\n\ttoRemove.forEach( ({ start, end }) => mod.body.remove( start, end ) );\n\n\tlet { imports, exports, defaultExport } = findImportsAndExports( mod.ast, code, comments );\n\n\tdisallowConflictingImports( imports );\n\n\tmod.imports = imports;\n\tmod.exports = exports;\n\tmod.defaultExport = defaultExport;\n\n\tlet conflicts = {};\n\n\tif ( options.strict ) {\n\t\tannotateAst( mod.ast, {\n\t\t\ttrackAssignments: null\n\t\t});\n\n\t\t// TODO there's probably an easier way to get this array\n\t\tObject.keys( mod.ast._declared ).concat( getUnscopedNames( mod ) ).forEach( n => {\n\t\t\tconflicts[n] = true;\n\t\t});\n\t}\n\n\tdetermineImportNames( imports, options.getModuleName, conflicts );\n\n\treturn mod;\n}\n\nfunction determineImportNames ( imports, userFn, usedNames ) {\n\tlet nameById = {};\n\tlet inferredNames = {};\n\n\timports.forEach( x => {\n\t\tlet moduleId = x.path;\n\t\tlet name;\n\n\t\tmoduleId = x.path;\n\n\t\t// use existing value\n\t\tif ( hasOwnProp.call( nameById, moduleId ) ) {\n\t\t\tx.name = nameById[ moduleId ];\n\t\t\treturn;\n\t\t}\n\n\t\t// if user supplied a function, defer to it\n\t\tif ( userFn && ( name = userFn( moduleId ) ) ) {\n\t\t\tname = sanitize( name );\n\n\t\t\tif ( hasOwnProp.call( usedNames, name ) ) {\n\t\t\t\t// TODO write a test for this\n\t\t\t\tthrow new Error( `Naming collision: module ${moduleId} cannot be called ${name}` );\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\tlet parts = splitPath( moduleId );\n\t\t\tlet i;\n\t\t\tlet prefix = '';\n\t\t\tlet candidate;\n\n\t\t\tdo {\n\t\t\t\ti = parts.length;\n\t\t\t\twhile ( i-- > 0 ) {\n\t\t\t\t\tcandidate = prefix + sanitize( parts.slice( i ).join( '__' ) );\n\n\t\t\t\t\tif ( !hasOwnProp.call( usedNames, candidate ) ) {\n\t\t\t\t\t\tname = candidate;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tprefix += '_';\n\t\t\t} while ( !name );\n\t\t}\n\n\t\tusedNames[ name ] = true;\n\t\tnameById[ moduleId ] = name;\n\n\t\tx.name = name;\n\t});\n\n\t// use inferred names for default imports, wherever they\n\t// don't clash with path-based names\n\timports.forEach( x => {\n\t\tif ( x.as && !hasOwnProp.call( usedNames, x.as ) ) {\n\t\t\tinferredNames[ x.path ] = x.as;\n\t\t}\n\t});\n\n\timports.forEach( x => {\n\t\tif ( hasOwnProp.call( inferredNames, x.path ) ) {\n\t\t\tx.name = inferredNames[ x.path ];\n\t\t}\n\t});\n}\n"
  },
  {
    "path": "src/utils/EsperantoError.js",
    "content": "var EsperantoError = function ( message, data ) {\n\tvar prop;\n\n\tthis.message = message;\n\tthis.stack = (new Error()).stack;\n\n\tfor ( prop in data ) {\n\t\tif ( data.hasOwnProperty( prop ) ) {\n\t\t\tthis[ prop ] = data[ prop ];\n\t\t}\n\t}\n};\n\nEsperantoError.prototype = new Error();\nEsperantoError.prototype.constructor = EsperantoError;\nEsperantoError.prototype.name = 'EsperantoError';\n\nexport default EsperantoError;"
  },
  {
    "path": "src/utils/amd/amdIntro.js",
    "content": "import getImportSummary from './getImportSummary';\nimport processName from './processName';\nimport processIds from './processIds';\n\nexport default function amdIntro ({ name, imports, hasExports, indentStr, absolutePaths, useStrict }) {\n\tlet { ids, names } = getImportSummary({ name, imports, absolutePaths });\n\n\tif ( hasExports ) {\n\t\tids.unshift( 'exports' );\n\t\tnames.unshift( 'exports' );\n\t}\n\n\tlet intro = `\ndefine(${processName(name)}${processIds(ids)}function (${names.join( ', ' ) }) {\n\n`;\n\n\tif ( useStrict ) {\n\t\tintro += `${indentStr}'use strict';\\n\\n`;\n\t}\n\n\treturn intro;\n}"
  },
  {
    "path": "src/utils/amd/getImportSummary.js",
    "content": "import resolveId from '../resolveId';\n\nexport default function getImportSummary ({ imports, absolutePaths, name }) {\n\tlet paths = [];\n\tlet names = [];\n\tlet seen = {};\n\tlet placeholders = 0;\n\n\timports.forEach( x => {\n\t\tlet path = x.id || x.path; // TODO unify these\n\n\t\tif ( !seen[ path ] ) {\n\t\t\tseen[ path ] = true;\n\n\t\t\tpaths.push( path );\n\n\t\t\t// TODO x could be an external module, or an internal one.\n\t\t\t// they have different shapes, resulting in the confusing\n\t\t\t// code below\n\t\t\tif ( ( x.needsDefault || x.needsNamed ) || ( x.specifiers && x.specifiers.length ) ) {\n\t\t\t\twhile ( placeholders ) {\n\t\t\t\t\tnames.push( `__dep${names.length}__` );\n\t\t\t\t\tplaceholders--;\n\t\t\t\t}\n\t\t\t\tnames.push( x.name );\n\t\t\t} else {\n\t\t\t\tplaceholders++;\n\t\t\t}\n\t\t}\n\t});\n\n\tlet ids = absolutePaths ? paths.map( relativePath => resolveId( relativePath, name ) ) : paths.slice();\n\n\treturn { ids, paths, names };\n}"
  },
  {
    "path": "src/utils/amd/processIds.js",
    "content": "import { quote } from '../mappers';\n\nexport default function processIds ( ids ) {\n\treturn ids.length ? '[' + ids.map( quote ).join( ', ' ) + '], ' : '';\n}"
  },
  {
    "path": "src/utils/amd/processName.js",
    "content": "import { quote } from '../mappers';\n\nexport default function processName ( name ) {\n\treturn name ? quote( name ) + ', ' : '';\n}"
  },
  {
    "path": "src/utils/ast/annotate.js",
    "content": "/*\n\tThis module traverse a module's AST, attaching scope information\n\tto nodes as it goes, which is later used to determine which\n\tidentifiers need to be rewritten to avoid collisions\n*/\n\nimport walk from './walk';\nimport { getName } from '../mappers';\n\nfunction Scope ( options ) {\n\toptions = options || {};\n\n\tthis.parent = options.parent;\n\tthis.names = options.params || [];\n}\n\nScope.prototype = {\n\tadd: function ( name ) {\n\t\tif (! ~this.names.indexOf( name ) ) // redeclaration of existing binding\n\t\t\tthis.names.push( name );\n\t},\n\n\tcontains: function ( name, ignoreTopLevel ) {\n\t\tif ( ignoreTopLevel && !this.parent ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ~this.names.indexOf( name ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( this.parent ) {\n\t\t\treturn this.parent.contains( name, ignoreTopLevel );\n\t\t}\n\n\t\treturn false;\n\t}\n};\n\nexport default function annotateAst ( ast, options ) {\n\tconst trackAssignments = options && options.trackAssignments;\n\n\tlet scope = new Scope();\n\tlet blockScope = new Scope();\n\tlet declared = {};\n\tlet topLevelFunctionNames = [];\n\tlet templateLiteralRanges = [];\n\n\tlet envDepth = 0;\n\n\twalk( ast, {\n\t\tenter ( node ) {\n\t\t\tif ( node.type === 'ImportDeclaration' || node.type === 'ExportSpecifier' ) {\n\t\t\t\tnode._skip = true;\n\t\t\t}\n\n\t\t\tif ( node._skip ) {\n\t\t\t\treturn this.skip();\n\t\t\t}\n\n\t\t\tswitch ( node.type ) {\n\t\t\t\tcase 'FunctionExpression':\n\t\t\t\tcase 'FunctionDeclaration':\n\n\t\t\t\t\tenvDepth += 1;\n\n\t\t\t\t\t// fallthrough\n\n\t\t\t\tcase 'ArrowFunctionExpression':\n\t\t\t\t\tif ( node.id ) {\n\t\t\t\t\t\taddToScope( node );\n\n\t\t\t\t\t\t// If this is the root scope, this may need to be\n\t\t\t\t\t\t// exported early, so we make a note of it\n\t\t\t\t\t\tif ( !scope.parent && node.type === 'FunctionDeclaration' ) {\n\t\t\t\t\t\t\ttopLevelFunctionNames.push( node.id.name );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tlet names = node.params.map( getName );\n\n\t\t\t\t\tnames.forEach( name => declared[ name ] = true );\n\n\t\t\t\t\tscope = node._scope = new Scope({\n\t\t\t\t\t\tparent: scope,\n\t\t\t\t\t\tparams: names // TODO rest params?\n\t\t\t\t\t});\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'BlockStatement':\n\t\t\t\t\tblockScope = node._blockScope = new Scope({\n\t\t\t\t\t\tparent: blockScope\n\t\t\t\t\t});\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'VariableDeclaration':\n\t\t\t\t\tnode.declarations.forEach( node.kind === 'let' ? addToBlockScope : addToScope );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ClassExpression':\n\t\t\t\tcase 'ClassDeclaration':\n\t\t\t\t\taddToScope( node );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'MemberExpression':\n\t\t\t\t\t!node.computed && ( node.property._skip = true );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Property':\n\t\t\t\t\tnode.key._skip = true;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'TemplateLiteral':\n\t\t\t\t\ttemplateLiteralRanges.push([ node.start, node.end ]);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ThisExpression':\n\t\t\t\t\tif (envDepth === 0) {\n\t\t\t\t\t\tnode._topLevel = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'AssignmentExpression':\n\t\t\t\t\tassignTo( node.left );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'UpdateExpression':\n\t\t\t\t\tassignTo( node.argument );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\tleave ( node ) {\n\t\t\tswitch ( node.type ) {\n\t\t\t\tcase 'FunctionExpression':\n\t\t\t\tcase 'FunctionDeclaration':\n\n\t\t\t\t\tenvDepth -= 1;\n\n\t\t\t\t\t// fallthrough\n\n\t\t\t\tcase 'ArrowFunctionExpression':\n\n\t\t\t\t\tscope = scope.parent;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'BlockStatement':\n\t\t\t\t\tblockScope = blockScope.parent;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t});\n\n\tfunction assignTo ( node ) {\n\t\tif ( trackAssignments && node.type === 'Identifier' && node.name === trackAssignments.name ) {\n\t\t\t// This is possibly somewhat hacky. Open to alternative approaches...\n\t\t\t// It will yield false positives if `foo` in `export default foo` is shadowed\n\t\t\t( trackAssignments._assignments || ( trackAssignments._assignments = [] ) ).push({\n\t\t\t\tscope,\n\t\t\t\tnode\n\t\t\t});\n\t\t}\n\t}\n\n\tfunction addToScope ( declarator ) {\n\t\tvar name = declarator.id.name;\n\n\t\tscope.add( name );\n\t\tdeclared[ name ] = true;\n\t}\n\n\tfunction addToBlockScope ( declarator ) {\n\t\tvar name = declarator.id.name;\n\n\t\tblockScope.add( name );\n\t\tdeclared[ name ] = true;\n\t}\n\n\tast._scope = scope;\n\tast._blockScope = blockScope;\n\tast._topLevelNames = ast._scope.names.concat( ast._blockScope.names );\n\tast._topLevelFunctionNames = topLevelFunctionNames;\n\tast._declared = declared;\n\tast._templateLiteralRanges = templateLiteralRanges;\n}\n"
  },
  {
    "path": "src/utils/ast/disallowIllegalReassignment.js",
    "content": "import hasOwnProp from 'utils/hasOwnProp';\n\nvar bindingMessage = 'Cannot reassign imported binding ',\n\tnamespaceMessage = 'Cannot reassign imported binding of namespace ';\n\nexport default function disallowIllegalReassignment ( node, importedBindings, importedNamespaces, scope ) {\n\tlet assignee, isNamespaceAssignment;\n\n\tif ( node.type === 'AssignmentExpression' ) {\n\t\tassignee = node.left;\n\t} else if ( node.type === 'UpdateExpression' ) {\n\t\tassignee = node.argument;\n\t} else {\n\t\treturn; // not an assignment\n\t}\n\n\tif ( assignee.type === 'MemberExpression' ) {\n\t\tassignee = assignee.object;\n\t\tisNamespaceAssignment = true;\n\t}\n\n\tif ( assignee.type !== 'Identifier' ) {\n\t\treturn; // not assigning to a binding\n\t}\n\n\tlet name = assignee.name;\n\n\tif ( hasOwnProp.call( isNamespaceAssignment ? importedNamespaces : importedBindings, name ) && !scope.contains( name ) ) {\n\t\tthrow new Error( ( isNamespaceAssignment ? namespaceMessage : bindingMessage ) + '`' + name + '`' );\n\t}\n}\n"
  },
  {
    "path": "src/utils/ast/findImportsAndExports.js",
    "content": "/**\n * Inspects a module and discovers/categorises import & export declarations\n * @param {object} ast - the result of parsing `source` with acorn\n * @param {string} source - the module's original source code\n * @param {array} comments - {start, end} position of comments\n * @returns {object} - { imports, exports, defaultExport }\n */\nexport default function findImportsAndExports ( ast, source, comments ) {\n\tlet imports = [];\n\tlet exports = [];\n\tlet defaultExport;\n\tlet previousDeclaration;\n\n\tast.body.forEach( node => {\n\t\tvar passthrough, declaration;\n\n\t\tif ( previousDeclaration ) {\n\t\t\tif ( previousDeclaration.node.type === 'ImportDeclaration' && node.type !== 'ImportDeclaration' ) {\n\t\t\t\t// For last import statement, next declaration starts at next comment or node, whichever is closest\n\t\t\t\tlet nextComment;\n\t\t\t\tfor ( let i = 0, len = comments.length; i < len; i++ ) {\n\t\t\t\t\tif ( comments[i].start > previousDeclaration.end ) {\n\t\t\t\t\t\tnextComment = comments[i];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( nextComment && nextComment.start < node.start ) {\n\t\t\t\t\tpreviousDeclaration.next = nextComment.start;\n\t\t\t\t} else {\n\t\t\t\t\tpreviousDeclaration.next = node.start;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tpreviousDeclaration.next = node.start;\t\n\t\t\t}\n\n\t\t\tif ( node.type !== 'EmptyStatement' ) {\n\t\t\t\tpreviousDeclaration = null;\n\t\t\t}\n\t\t}\n\n\t\tif ( node.type === 'ImportDeclaration' ) {\n\t\t\tdeclaration = processImport( node );\n\t\t\timports.push( declaration );\n\t\t}\n\n\t\telse if ( node.type === 'ExportDefaultDeclaration' ) {\n\t\t\tdeclaration = processDefaultExport( node, source );\n\t\t\texports.push( declaration );\n\n\t\t\tif ( defaultExport ) {\n\t\t\t\tthrow new Error( 'Duplicate default exports' );\n\t\t\t}\n\t\t\tdefaultExport = declaration;\n\t\t}\n\n\t\telse if ( node.type === 'ExportNamedDeclaration' ) {\n\t\t\tdeclaration = processExport( node, source );\n\t\t\texports.push( declaration );\n\n\t\t\tif ( node.source ) {\n\t\t\t\t// it's both an import and an export, e.g.\n\t\t\t\t// `export { foo } from './bar';\n\t\t\t\tpassthrough = processImport( node, true );\n\n\t\t\t\tpassthrough.specifiers.forEach( e => {\n\t\t\t\t\t// the import in `export { default } from 'foo';`\n\t\t\t\t\t// is a default import\n\t\t\t\t\tif ( e.name === 'default' ) {\n\t\t\t\t\t\te.isDefault = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\timports.push( passthrough );\n\n\t\t\t\tdeclaration.passthrough = passthrough;\n\t\t\t}\n\t\t}\n\n\t\tif ( declaration ) {\n\t\t\tpreviousDeclaration = declaration;\n\t\t}\n\t});\n\n\t// catch any trailing semicolons\n\tif ( previousDeclaration ) {\n\t\tpreviousDeclaration.next = source.length;\n\t\tpreviousDeclaration.isFinal = true;\n\t}\n\n\treturn { imports, exports, defaultExport };\n}\n\n/**\n * Generates a representation of an import declaration\n * @param {object} node - the original AST node\n * @param {boolean} passthrough - `true` if this is an `export { foo } from 'bar'`-style declaration\n * @returns {object}\n */\nfunction processImport ( node, passthrough ) {\n\tvar x = {\n\t\tmodule: null, // used by bundler - filled in later\n\t\tnode: node,\n\t\tstart: node.start,\n\t\tend: node.end,\n\t\tpassthrough: !!passthrough,\n\n\t\tpath: node.source.value,\n\t\tspecifiers: node.specifiers.map( s => {\n\t\t\tif ( s.type === 'ImportNamespaceSpecifier' ) {\n\t\t\t\treturn {\n\t\t\t\t\tisBatch: true,\n\t\t\t\t\tname: s.local.name, // TODO is this line necessary?\n\t\t\t\t\tas: s.local.name,\n\t\t\t\t\torigin: null // filled in later by bundler\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif ( s.type === 'ImportDefaultSpecifier' ) {\n\t\t\t\treturn {\n\t\t\t\t\tisDefault: true,\n\t\t\t\t\tname: 'default',\n\t\t\t\t\tas: s.local.name,\n\t\t\t\t\torigin: null\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tname: ( !!passthrough ? s.exported : s.imported ).name,\n\t\t\t\tas: s.local.name,\n\t\t\t\torigin: null\n\t\t\t};\n\t\t})\n\t};\n\n\t// TODO have different types of imports - batch, default, named\n\tif ( x.specifiers.length === 0 ) {\n\t\tx.isEmpty = true;\n\t} else if ( x.specifiers.length === 1 && x.specifiers[0].isDefault ) {\n\t\tx.isDefault = true;\n\t\tx.as = x.specifiers[0].as;\n\n\t} else if ( x.specifiers.length === 1 && x.specifiers[0].isBatch ) {\n\t\tx.isBatch = true;\n\t\tx.as = x.specifiers[0].name;\n\t} else {\n\t\tx.isNamed = true;\n\t}\n\n\treturn x;\n}\n\nfunction processDefaultExport ( node, source ) {\n\tconst d = node.declaration;\n\n\tlet result = {\n\t\tnode,\n\t\tisDefault: true,\n\t\tstart: node.start,\n\t\tend: node.end,\n\t\tvalue: source.slice( d.start, d.end ),\n\t\tvalueStart: d.start,\n\t\thasDeclaration: null,\n\t\ttype: null,\n\t\tname: null\n\t};\n\n\t// possible declaration types:\n\t//   * FunctionExpression  - `export default function () {...}`\n\t//   * FunctionDeclaration - `export default function foo () {...}`\n\t//   * ClassExpression     - `export default class {...}`\n\t//   * ClassDeclaration    - `export default class Foo {...}`\n\tconst match = /^(Function|Class)(Declaration)?/.exec( d.type );\n\n\tif ( match ) {\n\t\tresult.hasDeclaration = true;\n\t\tresult.type = ( match[2] ? 'named' : 'anon' ) + match[1];\n\n\t\tif ( match[2] ) {\n\t\t\tresult.name = d.id.name;\n\t\t}\n\t}\n\n\t// if no match, we have an expression like `export default whatever`\n\telse {\n\t\tresult.type = 'expression';\n\t\tresult.name = 'default';\n\t}\n\n\treturn result;\n}\n\n/**\n * Generates a representation of an export declaration\n * @param {object} node - the original AST node\n * @param {string} source - the original source code\n * @returns {object}\n */\nfunction processExport ( node, source ) {\n\tlet result = {\n\t\tnode,\n\t\tstart: node.start,\n\t\tend: node.end,\n\t\tvalue: null,\n\t\tvalueStart: null,\n\t\thasDeclaration: null,\n\t\ttype: null,\n\t\tname: null,\n\t\tspecifiers: null\n\t};\n\n\tconst d = node.declaration;\n\n\tif ( d ) {\n\t\tresult.hasDeclaration = true;\n\t\tresult.value = source.slice( d.start, d.end );\n\t\tresult.valueStart = d.start;\n\n\t\t// Case 1: `export var foo = 'bar'`\n\t\tif ( d.type === 'VariableDeclaration' ) {\n\t\t\tresult.type = 'varDeclaration';\n\t\t\tresult.name = d.declarations[0].id.name;\n\t\t}\n\n\t\t// Case 2: `export function foo () {...}`\n\t\telse if ( d.type === 'FunctionDeclaration' ) {\n\t\t\tresult.type = 'namedFunction';\n\t\t\tresult.name = d.id.name;\n\t\t}\n\n\t\t// Case 3: `export class Foo {...}`\n\t\telse if ( d.type === 'ClassDeclaration' ) {\n\t\t\tresult.type = 'namedClass';\n\t\t\tresult.name = d.id.name;\n\t\t}\n\t}\n\n\t// Case 9: `export { foo, bar };`\n\telse {\n\t\tresult.type = 'named';\n\t\tresult.specifiers = node.specifiers.map( s => {\n\t\t\treturn {\n\t\t\t\torigin: null, // filled in later by bundler\n\t\t\t\tname: s.local.name,\n\t\t\t\tas: s.exported.name\n\t\t\t};\n\t\t});\n\t}\n\n\treturn result;\n}\n"
  },
  {
    "path": "src/utils/ast/getUnscopedNames.js",
    "content": "import walk from './walk';\nimport hasOwnProp from 'utils/hasOwnProp';\n\nexport default function getUnscopedNames ( mod ) {\n\tvar unscoped = [], importedNames, scope;\n\n\tfunction imported ( name ) {\n\t\tif ( !importedNames ) {\n\t\t\timportedNames = {};\n\t\t\tmod.imports.forEach( i => {\n\t\t\t\t!i.passthrough && i.specifiers.forEach( s => {\n\t\t\t\t\timportedNames[ s.as ] = true;\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\treturn hasOwnProp.call( importedNames, name );\n\t}\n\n\twalk( mod.ast, {\n\t\tenter ( node ) {\n\t\t\t// we're only interested in references, not property names etc\n\t\t\tif ( node._skip ) return this.skip();\n\n\t\t\tif ( node._scope ) {\n\t\t\t\tscope = node._scope;\n\t\t\t}\n\n\t\t\tif ( node.type === 'Identifier' &&\n\t\t\t\t\t !scope.contains( node.name ) &&\n\t\t\t\t\t !imported( node.name ) &&\n\t\t\t\t\t !~unscoped.indexOf( node.name ) ) {\n\t\t\t\tunscoped.push( node.name );\n\t\t\t}\n\t\t},\n\n\t\tleave ( node ) {\n\t\t\tif ( node.type === 'Program' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( node._scope ) {\n\t\t\t\tscope = scope.parent;\n\t\t\t}\n\t\t}\n\t});\n\n\treturn unscoped;\n}"
  },
  {
    "path": "src/utils/ast/replaceIdentifiers.js",
    "content": "import hasOwnProp from 'utils/hasOwnProp';\n\nexport default function replaceIdentifiers ( body, node, identifierReplacements, scope ) {\n\tlet name = node.name;\n\tlet replacement = hasOwnProp.call( identifierReplacements, name ) && identifierReplacements[ name ];\n\n\t// TODO unchanged identifiers shouldn't have got this far -\n\t// remove the `replacement !== name` safeguard once that's the case\n\tif ( replacement && replacement !== name && !scope.contains( name, true ) ) {\n\t\t// rewrite\n\t\tbody.replace( node.start, node.end, replacement );\n\t}\n}\n"
  },
  {
    "path": "src/utils/ast/rewriteExportAssignments.js",
    "content": "import hasOwnProp from 'utils/hasOwnProp';\n\nexport default function rewriteExportAssignments ( body, node, parent, exports, scope, capturedUpdates ) {\n\tlet assignee;\n\n\tif ( node.type === 'AssignmentExpression' ) {\n\t\tassignee = node.left;\n\t} else if ( node.type === 'UpdateExpression' ) {\n\t\tassignee = node.argument;\n\t} else {\n\t\treturn; // not an assignment\n\t}\n\n\tif ( assignee.type !== 'Identifier' ) {\n\t\treturn;\n\t}\n\n\tlet name = assignee.name;\n\n\tif ( scope.contains( name, true ) ) {\n\t\treturn; // shadows an export\n\t}\n\n\tif ( exports && hasOwnProp.call( exports, name ) ) {\n\t\tlet exportAs = exports[ name ];\n\n\t\tif ( !!capturedUpdates ) {\n\t\t\tcapturedUpdates.push({ name, exportAs });\n\t\t\treturn;\n\t\t}\n\n\t\t// special case - increment/decrement operators\n\t\tif ( node.operator === '++' || node.operator === '--' ) {\n\t\t\tlet prefix = ``;\n\t\t\tlet suffix = `, exports.${exportAs} = ${name}`;\n\t\t\tif ( parent.type !== 'ExpressionStatement' ) {\n\t\t\t\tif ( !node.prefix ) {\n\t\t\t\t\tsuffix += `, ${name} ${node.operator === '++' ? '-' : '+'} 1`;\n\t\t\t\t}\n\t\t\t\tprefix += `( `;\n\t\t\t\tsuffix += ` )`;\n\t\t\t}\n\t\t\tbody.insert( node.start, prefix );\n\t\t\tbody.insert( node.end, suffix );\n\t\t} else {\n\t\t\tbody.insert( node.start, `exports.${exportAs} = ` );\n\t\t}\n\t}\n}"
  },
  {
    "path": "src/utils/ast/traverse.js",
    "content": "import walk from './walk';\nimport disallowIllegalReassignment from './disallowIllegalReassignment';\nimport replaceIdentifiers from './replaceIdentifiers';\nimport rewriteExportAssignments from './rewriteExportAssignments';\n\nexport default function traverseAst ( ast, body, identifierReplacements, importedBindings, importedNamespaces, exportNames ) {\n\tlet scope = ast._scope;\n\tlet blockScope = ast._blockScope;\n\tlet capturedUpdates = null;\n\tlet previousCapturedUpdates = null;\n\n\twalk( ast, {\n\t\tenter ( node, parent ) {\n\t\t\t// we're only interested in references, not property names etc\n\t\t\tif ( node._skip ) return this.skip();\n\n\t\t\tif ( node._scope ) {\n\t\t\t\tscope = node._scope;\n\t\t\t} else if ( node._blockScope ) {\n\t\t\t\tblockScope = node._blockScope;\n\t\t\t}\n\n\t\t\t// Special case: if you have a variable declaration that updates existing\n\t\t\t// bindings as a side-effect, e.g. `var a = b++`, where `b` is an exported\n\t\t\t// value, we can't simply append `exports.b = b` to the update (as we\n\t\t\t// normally would) because that would be syntactically invalid. Instead,\n\t\t\t// we capture the change and update the export (and any others) after the\n\t\t\t// variable declaration\n\t\t\tif ( node.type === 'VariableDeclaration' ) {\n\t\t\t\tpreviousCapturedUpdates = capturedUpdates;\n\t\t\t\tcapturedUpdates = [];\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdisallowIllegalReassignment( node, importedBindings, importedNamespaces, scope );\n\n\t\t\t// Rewrite assignments to exports inside functions, to keep bindings live.\n\t\t\t// This call may mutate `capturedUpdates`, which is used elsewhere\n\t\t\tif ( scope !== ast._scope ) {\n\t\t\t\trewriteExportAssignments( body, node, parent, exportNames, scope, capturedUpdates );\n\t\t\t}\n\n\t\t\tif ( node.type === 'Identifier' && parent.type !== 'FunctionExpression' ) {\n\t\t\t\treplaceIdentifiers( body, node, identifierReplacements, scope );\n\t\t\t}\n\n\t\t\t// Replace top-level this with undefined ES6 8.1.1.5.4\n\t\t\tif ( node.type === 'ThisExpression' && node._topLevel ) {\n\t\t\t\tbody.replace( node.start, node.end, 'undefined' );\n\t\t\t}\n\t\t},\n\n\t\tleave ( node ) {\n\t\t\t// Special case - see above\n\t\t\tif ( node.type === 'VariableDeclaration' ) {\n\t\t\t\tif ( capturedUpdates.length ) {\n\t\t\t\t\tbody.insert( node.end, capturedUpdates.map( exportCapturedUpdate ).join( '' ) );\n\t\t\t\t}\n\n\t\t\t\tcapturedUpdates = previousCapturedUpdates;\n\t\t\t}\n\n\t\t\tif ( node._scope ) {\n\t\t\t\tscope = scope.parent;\n\t\t\t} else if ( node._blockScope ) {\n\t\t\t\tblockScope = blockScope.parent;\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction exportCapturedUpdate ( c ) {\n\treturn ` exports.${c.exportAs} = ${c.name};`;\n}\n"
  },
  {
    "path": "src/utils/ast/walk.js",
    "content": "let shouldSkip;\nlet shouldAbort;\n\nexport default function walk ( ast, { enter, leave }) {\n\tshouldAbort = false;\n\tvisit( ast, null, enter, leave );\n}\n\nlet context = {\n\tskip: () => shouldSkip = true,\n\tabort: () => shouldAbort = true\n};\n\nlet childKeys = {};\n\nlet toString = Object.prototype.toString;\n\nfunction isArray ( thing ) {\n\treturn toString.call( thing ) === '[object Array]';\n}\n\nfunction visit ( node, parent, enter, leave ) {\n\tif ( !node || shouldAbort ) return;\n\n\tif ( enter ) {\n\t\tshouldSkip = false;\n\t\tenter.call( context, node, parent );\n\t\tif ( shouldSkip || shouldAbort ) return;\n\t}\n\n\tlet keys = childKeys[ node.type ] || (\n\t\tchildKeys[ node.type ] = Object.keys( node ).filter( key => typeof node[ key ] === 'object' )\n\t);\n\n\tlet key, value, i, j;\n\n\ti = keys.length;\n\twhile ( i-- ) {\n\t\tkey = keys[i];\n\t\tvalue = node[ key ];\n\n\t\tif ( isArray( value ) ) {\n\t\t\tj = value.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\tvisit( value[j], node, enter, leave );\n\t\t\t}\n\t\t}\n\n\t\telse if ( value && value.type ) {\n\t\t\tvisit( value, node, enter, leave );\n\t\t}\n\t}\n\n\tif ( leave && !shouldAbort ) {\n\t\tleave( node, parent );\n\t}\n}"
  },
  {
    "path": "src/utils/builtins.js",
    "content": "// from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects\n// we add `exports` to this list, to avoid conflicts\nexport default 'Array ArrayBuffer DataView Date Error EvalError Float32Array Float64Array Function Generator GeneratorFunction Infinity Int16Array Int32Array Int8Array InternalError Intl Iterator JSON Map Math NaN Number Object ParallelArray Promise Proxy RangeError ReferenceError Reflect RegExp Set StopIteration String Symbol SyntaxError TypeError TypedArray URIError Uint16Array Uint32Array Uint8Array Uint8ClampedArray WeakMap WeakSet decodeURI decodeURIComponent encodeURI encodeURIComponent escape eval exports isFinite isNaN null parseFloat parseInt undefined unescape uneval'.split( ' ' );"
  },
  {
    "path": "src/utils/disallowConflictingImports.js",
    "content": "import hasOwnProp from './hasOwnProp';\n\nexport default function disallowConflictingImports ( imports ) {\n\tlet usedNames = {};\n\n\timports.forEach( x => {\n\t\tif ( x.passthrough ) return;\n\n\t\tif ( x.as ) {\n\t\t\tcheckName( x.as );\n\t\t} else {\n\t\t\tx.specifiers.forEach( checkSpecifier );\n\t\t}\n\t});\n\n\tfunction checkSpecifier ( s ) {\n\t\tcheckName( s.as );\n\t}\n\n\tfunction checkName ( name ) {\n\t\tif ( hasOwnProp.call( usedNames, name ) ) {\n\t\t\tthrow new SyntaxError( `Duplicated import ('${name}')` );\n\t\t}\n\n\t\tusedNames[ name ] = true;\n\t}\n}\n"
  },
  {
    "path": "src/utils/getReadOnlyIdentifiers.js",
    "content": "/**\n * Scans an array of imports, and determines which identifiers\n   are readonly, and which cannot be assigned to. For example\n   you cannot `import foo from 'foo'` then do `foo = 42`, nor\n   can you `import * as foo from 'foo'` then do `foo.answer = 42`\n * @param {array} imports - the array of imports\n * @returns {array} [ importedBindings, importedNamespaces ]\n */\nexport default function getReadOnlyIdentifiers ( imports ) {\n\tvar importedBindings = {}, importedNamespaces = {};\n\n\timports.forEach( x => {\n\t\tif ( x.passthrough ) return;\n\n\t\tx.specifiers.forEach( s => {\n\t\t\tif ( s.isBatch ) {\n\t\t\t\timportedNamespaces[ s.as ] = true;\n\t\t\t} else {\n\t\t\t\timportedBindings[ s.as ] = true;\n\t\t\t}\n\t\t});\n\t});\n\n\treturn [ importedBindings, importedNamespaces ];\n}"
  },
  {
    "path": "src/utils/hasNamedExports.js",
    "content": "export default function hasNamedExports ( mod ) {\n\tvar i = mod.exports.length;\n\n\twhile ( i-- ) {\n\t\tif ( !mod.exports[i].isDefault ) {\n\t\t\treturn true;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/utils/hasNamedImports.js",
    "content": "export default function hasNamedImports ( mod ) {\n\tvar i = mod.imports.length;\n\n\twhile ( i-- ) {\n\t\tif ( mod.imports[i].isNamed ) {\n\t\t\treturn true;\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "src/utils/hasOwnProp.js",
    "content": "var hasOwnProp = Object.prototype.hasOwnProperty;\nexport default hasOwnProp;"
  },
  {
    "path": "src/utils/mappers.js",
    "content": "export function getId ( m ) {\n\treturn m.id;\n}\n\nexport function getName ( m ) {\n\treturn m.name;\n}\n\nexport function quote ( str ) {\n\treturn \"'\" + JSON.stringify(str).slice(1, -1).replace(/'/g, \"\\\\'\") + \"'\";\n}\n\nexport function req ( path ) {\n\treturn `require(${quote(path)})`;\n}\n\nexport function globalify ( name ) {\n  \tif ( /^__dep\\d+__$/.test( name ) ) {\n\t\treturn 'undefined';\n\t} else {\n\t\treturn `global.${name}`;\n\t}\n}\n"
  },
  {
    "path": "src/utils/packageResult.js",
    "content": "import walk from './ast/walk';\nimport { splitPath } from 'utils/sanitize';\n\nconst ABSOLUTE_PATH = /^(?:[A-Z]:)?[\\/\\\\]/i;\n\nlet warned = {};\n\nexport default function packageResult ( bundleOrModule, body, options, methodName, isBundle ) {\n\t// wrap output\n\tif ( options.banner ) body.prepend( options.banner );\n\tif ( options.footer ) body.append( options.footer );\n\n\tlet code = body.toString();\n\tlet map;\n\n\tif ( !!options.sourceMap ) {\n\t\tif ( options.sourceMap !== 'inline' && !options.sourceMapFile ) {\n\t\t\tthrow new Error( 'You must provide `sourceMapFile` option' );\n\t\t}\n\n\t\tif ( !isBundle && !options.sourceMapSource ) {\n\t\t\tthrow new Error( 'You must provide `sourceMapSource` option' );\n\t\t}\n\n\t\tlet sourceMapFile;\n\t\tif ( options.sourceMap === 'inline' ) {\n\t\t\tsourceMapFile = null;\n\t\t} else {\n\t\t\tsourceMapFile = ABSOLUTE_PATH.test( options.sourceMapFile ) ? options.sourceMapFile : './' + splitPath( options.sourceMapFile ).pop();\n\t\t}\n\n\t\tif ( isBundle ) {\n\t\t\tmarkBundleSourcemapLocations( bundleOrModule );\n\t\t} else {\n\t\t\tmarkModuleSourcemapLocations( bundleOrModule );\n\t\t}\n\n\t\tmap = body.generateMap({\n\t\t\tincludeContent: true,\n\t\t\tfile: sourceMapFile,\n\t\t\tsource: ( sourceMapFile && !isBundle ) ? getRelativePath( sourceMapFile, options.sourceMapSource ) : null\n\t\t});\n\n\t\tif ( options.sourceMap === 'inline' ) {\n\t\t\tcode += '\\n//# sourceMa' + 'ppingURL=' + map.toUrl();\n\t\t\tmap = null;\n\t\t} else {\n\t\t\tcode += '\\n//# sourceMa' + 'ppingURL=' + sourceMapFile + '.map';\n\t\t}\n\t} else {\n\t\tmap = null;\n\t}\n\n\treturn {\n\t\tcode,\n\t\tmap,\n\t\ttoString () {\n\t\t\tif ( !warned[ methodName ] ) {\n\t\t\t\tconsole.log( `Warning: esperanto.${methodName}() returns an object with a 'code' property. You should use this instead of using the returned value directly` );\n\t\t\t\twarned[ methodName ] = true;\n\t\t\t}\n\n\t\t\treturn code;\n\t\t}\n\t};\n}\n\nfunction getRelativePath ( from, to ) {\n\tvar fromParts, toParts, i;\n\n\tfromParts = splitPath( from );\n\ttoParts = splitPath( to );\n\n\tfromParts.pop(); // get dirname\n\n\twhile ( fromParts[0] === '.' ) {\n\t\tfromParts.shift();\n\t}\n\n\twhile ( fromParts[0] === toParts[0] ) {\n\t\tfromParts.shift();\n\t\ttoParts.shift();\n\t}\n\n\tif ( fromParts.length ) {\n\t\ti = fromParts.length;\n\t\twhile ( i-- ) fromParts[i] = '..';\n\n\t\treturn fromParts.concat( toParts ).join( '/' );\n\t} else {\n\t\ttoParts.unshift( '.' );\n\t\treturn toParts.join( '/' );\n\t}\n}\n\nfunction markBundleSourcemapLocations ( bundle ) {\n\tbundle.modules.forEach( mod => {\n\t\twalk( mod.ast, {\n\t\t\tenter: node => {\n\t\t\t\tmod.body.addSourcemapLocation( node.start );\n\t\t\t}\n\t\t});\n\t});\n}\n\nfunction markModuleSourcemapLocations ( mod ) {\n\twalk( mod.ast, {\n\t\tenter: node => {\n\t\t\tmod.body.addSourcemapLocation( node.start );\n\t\t}\n\t});\n}\n"
  },
  {
    "path": "src/utils/promiseSequence.js",
    "content": "import { Promise } from 'sander';\n\nexport default function promiseSequence ( arr, callback ) {\n\tconst len = arr.length;\n\tlet results = new Array( len );\n\n\tlet promise = Promise.resolve();\n\n\tfunction next ( i ) {\n\t\treturn promise\n\t\t\t.then( () => callback( arr[i], i ) )\n\t\t\t.then( result => results[i] = result );\n\t}\n\n\tlet i;\n\n\tfor ( i = 0; i < len; i += 1 ) {\n\t\tpromise = next( i );\n\t}\n\n\treturn promise.then( () => results );\n}"
  },
  {
    "path": "src/utils/resolveId.js",
    "content": "import { splitPath } from 'utils/sanitize';\n\n/**\n * Resolves an importPath relative to the module that is importing it\n * @param {string} importPath - the (possibly relative) path of an imported module\n * @param {string} importerPath - the (relative to `base`) path of the importing module\n * @returns {string}\n */\nexport default function resolveId ( importPath, importerPath ) {\n\tvar resolved, importerParts, importParts;\n\n\tif ( importPath[0] !== '.' ) {\n\t\tresolved = importPath;\n\t} else {\n\t\timporterParts = splitPath( importerPath );\n\t\timportParts = splitPath( importPath );\n\n\t\tif ( importParts[0] === '.' ) {\n\t\t\timportParts.shift();\n\t\t}\n\n\t\timporterParts.pop(); // get dirname\n\t\twhile ( importParts[0] === '..' ) {\n\t\t\timportParts.shift();\n\t\t\timporterParts.pop();\n\t\t}\n\n\t\twhile ( importParts[0] === '.' ) {\n\t\t\timportParts.shift();\n\t\t}\n\n\t\tresolved = importerParts.concat( importParts ).join( '/' );\n\t}\n\n\treturn resolved;\n}\n\nexport function resolveAgainst ( importerPath ) {\n\treturn function ( importPath ) {\n\t\treturn resolveId( importPath, importerPath );\n\t};\n}\n"
  },
  {
    "path": "src/utils/sanitize.js",
    "content": "const RESERVED = 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield'.split( ' ' );\nconst INVALID_CHAR = /[^a-zA-Z0-9_$]/g;\nconst INVALID_LEADING_CHAR = /[^a-zA-Z_$]/;\n\n/**\n * Generates a sanitized (i.e. valid identifier) name from a module ID\n * @param {string} id - a module ID, or part thereof\n * @returns {string}\n */\nexport default function sanitize ( name ) {\n\tname = name.replace( INVALID_CHAR, '_' );\n\n\tif ( INVALID_LEADING_CHAR.test( name[0] ) || ~RESERVED.indexOf( name ) ) {\n\t\tname = `_${name}`;\n\t}\n\n\treturn name;\n}\n\nvar pathSplitRE = /\\/|\\\\/;\nexport function splitPath ( path ) {\n\treturn path.split( pathSplitRE );\n}\n"
  },
  {
    "path": "src/utils/umd/requireName.js",
    "content": "import EsperantoError from 'utils/EsperantoError';\n\nexport default function requireName ( options ) {\n\tif ( !options.name ) {\n\t\tthrow new EsperantoError( 'You must supply a `name` option for UMD modules', {\n\t\t\tcode: 'MISSING_NAME'\n\t\t});\n\t}\n}"
  },
  {
    "path": "src/utils/umd/umdIntro.js",
    "content": "import { globalify, req } from 'utils/mappers';\nimport processName from '../amd/processName';\nimport processIds from '../amd/processIds';\nimport getImportSummary from '../amd/getImportSummary';\n\nexport default function umdIntro ({ amdName, name, hasExports, imports, absolutePaths, externalDefaults, indentStr, strict, useStrict }) {\n\tconst useStrictPragma = useStrict ? ` 'use strict';` : '';\n\tlet intro;\n\n\tif ( !hasExports && !imports.length ) {\n\t\tintro =\n\t\t\t`(function (factory) {\n\t\t\t\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\t\t\t\ttypeof define === 'function' && define.amd ? define(${processName(amdName)}factory) :\n\t\t\t\tfactory()\n\t\t\t}(function () {${useStrictPragma}\n\n\t\t\t`;\n\t}\n\n\telse {\n\t\tlet { ids, paths, names } = getImportSummary({ imports, name: amdName, absolutePaths });\n\n\t\tlet amdExport, cjsExport, globalExport, defaultsBlock;\n\n\t\tif ( strict ) {\n\t\t\tcjsExport = `factory(${( hasExports ? [ 'exports' ] : [] ).concat( paths.map( req ) ).join( ', ' )})`;\n\t\t\tlet globalDeps = ( hasExports ? [ `(global.${name} = {})` ] : [] ).concat( names.map( globalify ) ).join( ', ' );\n\t\t\tglobalExport = `factory(${globalDeps})`;\n\n\t\t\tif ( hasExports ) {\n\t\t\t\tids.unshift( 'exports' );\n\t\t\t\tnames.unshift( 'exports' );\n\t\t\t}\n\n\t\t\tamdExport = `define(${processName(amdName)}${processIds(ids)}factory)`;\n\t\t\tdefaultsBlock = '';\n\t\t\tif ( externalDefaults && externalDefaults.length > 0 ) {\n\t\t\t\tdefaultsBlock = externalDefaults.map( x =>\n\t\t\t\t\t'\\t' + ( x.needsNamed ? `var ${x.name}__default` : x.name ) +\n\t\t\t\t\t\t` = ('default' in ${x.name} ? ${x.name}['default'] : ${x.name});`\n\t\t\t\t).join('\\n') + '\\n\\n';\n\t\t\t}\n\t\t} else {\n\t\t\tamdExport = `define(${processName(amdName)}${processIds(ids)}factory)`;\n\t\t\tcjsExport = ( hasExports ? 'module.exports = ' : '' ) + `factory(${paths.map( req ).join( ', ' )})`;\n\t\t\tglobalExport = ( hasExports ? `global.${name} = ` : '' ) + `factory(${names.map( globalify ).join( ', ' )})`;\n\n\t\t\tdefaultsBlock = '';\n\t\t}\n\n\t\tintro =\n\t\t\t`(function (global, factory) {\n\t\t\t\ttypeof exports === 'object' && typeof module !== 'undefined' ? ${cjsExport} :\n\t\t\t\ttypeof define === 'function' && define.amd ? ${amdExport} :\n\t\t\t\t${globalExport}\n\t\t\t}(this, function (${names.join( ', ' )}) {${useStrictPragma}\n\n\t\t\t${defaultsBlock}`;\n\n\t}\n\n\treturn intro.replace( /^\\t\\t\\t/gm, '' ).replace( /\\t/g, indentStr );\n}"
  },
  {
    "path": "test/.jshintrc",
    "content": "{\n\t\"boss\": true,\n\t\"unused\": true,\n\t\"undef\": true,\n\t\"esnext\": true,\n\t\"globals\": {\n\t\t\"process\": true,\n\t\t\"require\": true,\n\t\t\"module\": true,\n\t\t\"__dirname\": true,\n\t\t\"define\": true,\n\n\t\t\"describe\": true,\n\t\t\"it\": true,\n\t\t\"before\": true,\n\n\t\t\"setTimeout\": true,\n\t\t\"console\": true,\n\t\t\"window\": true\n\t}\n}\n"
  },
  {
    "path": "test/bundle/index.js",
    "content": "var path = require( 'path' );\nvar assert = require( 'assert' );\nvar sander = require( 'sander' );\nvar makeWhitespaceVisible = require( '../utils/makeWhitespaceVisible' );\nvar esperanto = require( '../../' );\n\nPromise = sander.Promise;\nglobal.assert = assert;\n\nmodule.exports = function () {\n\treturn new Promise( function ( fulfil ) {\n\t\tvar start;\n\n\t\tdescribe( 'esperanto.bundle()', function () {\n\t\t\tvar profiles;\n\n\t\t\tthis.timeout( 20000 );\n\n\t\t\tbefore( function () {\n\t\t\t\tif ( process.env.BUILD_TIMEOUT ) {\n\t\t\t\t\tthis.timeout( parseInt( process.env.BUILD_TIMEOUT ) );\n\t\t\t\t}\n\n\t\t\t\tsander.rimrafSync( 'es6-module-transpiler-tests/bundled-output' );\n\t\t\t\tstart = Date.now();\n\t\t\t});\n\n\t\t\tafter( function () {\n\t\t\t\tfulfil( Date.now() - start );\n\t\t\t});\n\n\t\t\tdescribe( 'ES6 module semantics tests from es6-module-transpiler:', function () {\n\t\t\t\tsander.readdirSync( __dirname, '../es6-module-transpiler-tests/input' ).forEach( function ( dir ) {\n\t\t\t\t\tvar config, cjs;\n\n\t\t\t\t\tconfig = require( '../es6-module-transpiler-tests/input/' + dir + '/_config' );\n\n\t\t\t\t\tit( dir, function () {\n\t\t\t\t\t\t// Create CommonJS modules, then require the entry module\n\t\t\t\t\t\treturn esperanto.bundle({\n\t\t\t\t\t\t\tbase: path.resolve( 'es6-module-transpiler-tests/input', dir ),\n\t\t\t\t\t\t\tentry: config.entry\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.then( function ( bundle ) {\n\t\t\t\t\t\t\tcjs = bundle.toCjs({ strict: true }).code;\n\t\t\t\t\t\t\treturn sander.writeFile( 'es6-module-transpiler-tests/bundled-output', dir + '.js', cjs );\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.then( function () {\n\t\t\t\t\t\t\tvar missingError;\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\trequire( path.resolve( 'es6-module-transpiler-tests/bundled-output', dir ) );\n\t\t\t\t\t\t\t\tif ( config.expectedError ) {\n\t\t\t\t\t\t\t\t\tmissingError = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch( err ) {\n\t\t\t\t\t\t\t\tif ( !config.expectedError || !~err.message.indexOf( config.expectedError ) ) {\n\t\t\t\t\t\t\t\t\tconsole.log( 'bundle>>>\\n%s\\n<<<', cjs );\n\t\t\t\t\t\t\t\t\tthrow err;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( missingError ) {\n\t\t\t\t\t\t\t\tconsole.log( 'bundle>>>\\n%s\\n<<<', cjs );\n\t\t\t\t\t\t\t\tthrow new Error( 'Expected error \"' + config.expectedError + '\"' );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, function ( err ) {\n\t\t\t\t\t\t\tif ( !config.expectedError || !~err.message.indexOf( config.expectedError ) ) {\n\t\t\t\t\t\t\t\tconsole.log( 'bundle>>>\\n%s\\n<<<', cjs );\n\t\t\t\t\t\t\t\tthrow err;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tprofiles = [\n\t\t\t\t{ description: 'bundle.concat()', method: 'concat', outputdir: 'concat' },\n\t\t\t\t{ description: 'bundle.toAmd()', method: 'toAmd', outputdir: 'amdDefaults' },\n\t\t\t\t{ description: 'bundle.toUmd()', method: 'toUmd', outputdir: 'umdDefaults', options: { name: 'myModule' } },\n\t\t\t\t{ description: 'bundle.toCjs()', method: 'toCjs', outputdir: 'cjsDefaults' },\n\t\t\t\t{ description: 'bundle.toAmd({ strict: true })', method: 'toAmd', outputdir: 'amd', options: { strict: true } },\n\t\t\t\t{ description: 'bundle.toUmd({ strict: true })', method: 'toUmd', outputdir: 'umd', options: { strict: true, name: 'myModule' } },\n\t\t\t\t{ description: 'bundle.toCjs({ strict: true })', method: 'toCjs', outputdir: 'cjs', options: { strict: true } }\n\t\t\t];\n\n\t\t\tprofiles.forEach( function ( profile ) {\n\t\t\t\tdescribe( profile.description + ':', function () {\n\t\t\t\t\tsander.readdirSync( __dirname, 'input' )\n\t\t\t\t\t\t.filter( Number ) // filter out .DS_Store and assorted crap\n\t\t\t\t\t\t.forEach( function ( dir ) {\n\t\t\t\t\t\t\tvar config = require( './input/' + dir + '/_config' );\n\n\t\t\t\t\t\t\t( config.solo ? it.only : it )( dir + ': ' + config.description, function () {\n\t\t\t\t\t\t\t\treturn esperanto.bundle({\n\t\t\t\t\t\t\t\t\tbase: path.resolve( 'bundle/input', dir ),\n\t\t\t\t\t\t\t\t\tentry: config.entry || 'main',\n\t\t\t\t\t\t\t\t\tskip: config.skip,\n\t\t\t\t\t\t\t\t\tnames: config.names,\n\t\t\t\t\t\t\t\t\ttransform: config.transform,\n\t\t\t\t\t\t\t\t\tresolvePath: config.resolvePath,\n\t\t\t\t\t\t\t\t\tmodules: config.modules\n\t\t\t\t\t\t\t\t}).then( function ( bundle ) {\n\t\t\t\t\t\t\t\t\tvar options, transpiled, actual;\n\n\t\t\t\t\t\t\t\t\toptions = profile.options || {};\n\n\t\t\t\t\t\t\t\t\tif ( ( bundle.imports.length && !config.imports ) || ( bundle.exports.length && !config.exports ) ) {\n\t\t\t\t\t\t\t\t\t\tthrow new Error( 'config is missing imports/exports (expected ' + JSON.stringify( bundle.imports ) + ', ' + JSON.stringify( bundle.exports ) + ')' );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( config.imports || bundle.imports.length ) {\n\t\t\t\t\t\t\t\t\t\tassert.deepEqual( bundle.imports.sort(), config.imports.sort() );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( config.exports || bundle.exports.length ) {\n\t\t\t\t\t\t\t\t\t\tassert.deepEqual( bundle.exports.sort(), config.exports.sort() );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\ttranspiled = bundle[ profile.method ]({\n\t\t\t\t\t\t\t\t\t\tstrict: options.strict,\n\t\t\t\t\t\t\t\t\t\tname: options.name,\n\t\t\t\t\t\t\t\t\t\tamdName: config.amdName,\n\t\t\t\t\t\t\t\t\t\tbanner: config.banner,\n\t\t\t\t\t\t\t\t\t\tfooter: config.footer,\n\t\t\t\t\t\t\t\t\t\tuseStrict: config.useStrict,\n\t\t\t\t\t\t\t\t\t\tsourceMap: config.sourceMap\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\tif ( config.error ) {\n\t\t\t\t\t\t\t\t\t\tthrow new Error( 'Expected error but none was raised' );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tactual = makeWhitespaceVisible( transpiled.code );\n\n\t\t\t\t\t\t\t\t\t// necessary for CI\n\t\t\t\t\t\t\t\t\tif ( config.sourceMap ) {\n\t\t\t\t\t\t\t\t\t\tactual = actual.replace( /base64,.+/, 'base64,xyz' );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturn sander.readFile( 'bundle/output/', profile.outputdir, dir + '.js' ).then( String ).then( function ( str ) {\n\t\t\t\t\t\t\t\t\t\tvar expected = makeWhitespaceVisible( str );\n\n\t\t\t\t\t\t\t\t\t\tif ( config.strict && !options.strict ) {\n\t\t\t\t\t\t\t\t\t\t\tthrow new Error( 'Test should fail in non-strict mode' );\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tassert.equal( actual, expected, 'Expected\\n>\\n' + actual + '\\n>\\n\\nto match\\n\\n>\\n' + expected + '\\n>' );\n\t\t\t\t\t\t\t\t\t}).catch( function ( err ) {\n\t\t\t\t\t\t\t\t\t\tif ( err.code === 'ENOENT' ) {\n\t\t\t\t\t\t\t\t\t\t\tassert.equal( actual, '', 'Expected\\n>\\n' + actual + '\\n>\\n\\nto match non-existent file' );\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\tthrow err;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}).catch( function ( err ) {\n\t\t\t\t\t\t\t\t\t// strict mode tests should fail\n\t\t\t\t\t\t\t\t\tif ( /strict mode/.test( err.message ) && config.strict ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( /bundles that have no imports\\/exports/.test( err.message ) && profile.method === 'concat' ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( !config.error ) {\n\t\t\t\t\t\t\t\t\t\tthrow err;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( config.error instanceof RegExp ) {\n\t\t\t\t\t\t\t\t\t\tif ( !config.error.test( err.message ) ) {\n\t\t\t\t\t\t\t\t\t\t\tthrow err;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} else if ( !config.error( err ) ) {\n\t\t\t\t\t\t\t\t\t\tthrow err;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t});\n};\n"
  },
  {
    "path": "test/bundle/input/01/_config.js",
    "content": "module.exports = {\n\tdescription: 'bundles a simple collection of modules'\n};"
  },
  {
    "path": "test/bundle/input/01/foo.js",
    "content": "var message = 'yes';\nexport default message;\n"
  },
  {
    "path": "test/bundle/input/01/main.js",
    "content": "import foo from './foo';\nconsole.log( foo );\n"
  },
  {
    "path": "test/bundle/input/02/_config.js",
    "content": "module.exports = {\n\tdescription: 'bundles modules in index.js files'\n};"
  },
  {
    "path": "test/bundle/input/02/foo/index.js",
    "content": "var message = 'yes';\nexport default message;\n"
  },
  {
    "path": "test/bundle/input/02/main.js",
    "content": "import foo from './foo';\nconsole.log( foo );"
  },
  {
    "path": "test/bundle/input/03/_config.js",
    "content": "module.exports = {\n\tdescription: 'allows external imports',\n\timports: [ 'external' ]\n};"
  },
  {
    "path": "test/bundle/input/03/foo.js",
    "content": "var bar = 'yes';\nexport default bar;\n"
  },
  {
    "path": "test/bundle/input/03/main.js",
    "content": "import foo from './foo';\nimport external from 'external';\n\nconsole.log( external( foo ) );"
  },
  {
    "path": "test/bundle/input/04/_config.js",
    "content": "module.exports = {\n\tdescription: 'exports a default export',\n\texports: [ 'default' ]\n};"
  },
  {
    "path": "test/bundle/input/04/foo.js",
    "content": "export var answer = 42;"
  },
  {
    "path": "test/bundle/input/04/main.js",
    "content": "import { answer } from './foo';\nexport default answer * 2;"
  },
  {
    "path": "test/bundle/input/05/_config.js",
    "content": "module.exports = {\n\tdescription: 'exports named exports',\n\tstrict: true,\n\texports: [ 'four', 'five', 'six' ]\n};"
  },
  {
    "path": "test/bundle/input/05/main.js",
    "content": "import { one, two, three } from './numbers';\n\nexport var four = one + 3;\nexport var five = two + 3;\nexport var six = three + 3;\n\nfour = 99;"
  },
  {
    "path": "test/bundle/input/05/numbers.js",
    "content": "export var one = 1;\nexport var two = 2;\nexport var three = 3;"
  },
  {
    "path": "test/bundle/input/06/_config.js",
    "content": "module.exports = {\n\tdescription: 'gives legal names to nested imports',\n\timports: [ 'utils/external' ]\n};"
  },
  {
    "path": "test/bundle/input/06/main.js",
    "content": "import message from 'nested/foo';\nimport external from 'utils/external';\nconsole.log( message );"
  },
  {
    "path": "test/bundle/input/06/nested/foo.js",
    "content": "export default 'this is a message';"
  },
  {
    "path": "test/bundle/input/07/_config.js",
    "content": "module.exports = {\n\tdescription: 'modules can be skipped',\n\tskip: [ 'bar' ]\n};\n"
  },
  {
    "path": "test/bundle/input/07/bar.js",
    "content": "export default 'this is bar';\n"
  },
  {
    "path": "test/bundle/input/07/foo.js",
    "content": "export default 'this is foo';\n"
  },
  {
    "path": "test/bundle/input/07/main.js",
    "content": "import foo from 'foo';\nimport bar from 'bar';\n\nfunction logFoo () {\n\tconsole.log( foo );\n}\n\nfunction logBar () {\n\tconsole.log( bar );\n}\n"
  },
  {
    "path": "test/bundle/input/08/_config.js",
    "content": "module.exports = {\n\tdescription: 'external module names are guessed (affects UMD only)',\n\timports: [ 'external' ]\n};"
  },
  {
    "path": "test/bundle/input/08/main.js",
    "content": "import ImplicitlyNamed from 'external';\n"
  },
  {
    "path": "test/bundle/input/09/_config.js",
    "content": "module.exports = {\n\tdescription: 'external module names can be specified (affects UMD only)',\n\timports: [ 'external' ],\n\tnames: {\n\t\texternal: 'Correct'\n\t}\n};\n"
  },
  {
    "path": "test/bundle/input/09/main.js",
    "content": "import ExplicitlyNamed from 'external';\n"
  },
  {
    "path": "test/bundle/input/10/_config.js",
    "content": "module.exports = {\n\tdescription: 'does not affect ES6 classes',\n\texports: [ 'default' ]\n};"
  },
  {
    "path": "test/bundle/input/10/main.js",
    "content": "export default class Foo {\n\tconstructor( str ) {\n\t\tthis.str = str;\n\t}\n\n\ttoString() {\n\t\treturn this.str;\n\t}\n}\n"
  },
  {
    "path": "test/bundle/input/11/_config.js",
    "content": "module.exports = {\n\tdescription: 'exports chains correctly in strict mode',\n\tstrict: true,\n\texports: [ 'foo', 'bar', 'baz', 'qux' ]\n};"
  },
  {
    "path": "test/bundle/input/11/a.js",
    "content": "export var foo = 1;\nexport var bar = 2;\n\nfoo = 3;"
  },
  {
    "path": "test/bundle/input/11/b.js",
    "content": "export default 4;"
  },
  {
    "path": "test/bundle/input/11/main.js",
    "content": "import { foo, bar } from './a';\nimport baz from './b';\n\nvar qux = 5;\nqux = 6;\n\nexport { foo, bar, baz, qux };\n"
  },
  {
    "path": "test/bundle/input/12/_config.js",
    "content": "module.exports = {\n\tdescription: 'throws an error if a non-exported identifier is imported',\n\terror: /does not export/\n};"
  },
  {
    "path": "test/bundle/input/12/foo.js",
    "content": "var bar = 'not exported';"
  },
  {
    "path": "test/bundle/input/12/main.js",
    "content": "import { bar } from './foo';"
  },
  {
    "path": "test/bundle/input/13/_config.js",
    "content": "module.exports = {\n\tdescription: 'throw error with file and location error if acorn cannot parse',\n\terror: function ( err ) {\n\t\treturn err.file === require( 'path' ).resolve( __dirname, 'main.js' ) && err.loc.line === 1 && err.loc.column === 4;\n\t}\n};"
  },
  {
    "path": "test/bundle/input/13/main.js",
    "content": "var 42 = answer;\n"
  },
  {
    "path": "test/bundle/input/14/_config.js",
    "content": "module.exports = {\n\tdescription: 'handles default imports from external modules correctly',\n\timports: [ 'external' ]\n};"
  },
  {
    "path": "test/bundle/input/14/main.js",
    "content": "import foo from './external';\nfoo();"
  },
  {
    "path": "test/bundle/input/15/_config.js",
    "content": "module.exports = {\n\tdescription: 'handles named imports from external modules correctly',\n\timports: [ 'external' ],\n\tstrict: true\n};"
  },
  {
    "path": "test/bundle/input/15/main.js",
    "content": "import { foo } from './external';\nfoo();"
  },
  {
    "path": "test/bundle/input/16/_config.js",
    "content": "module.exports = {\n\tdescription: 'handles conflicting imports'\n};"
  },
  {
    "path": "test/bundle/input/16/a.js",
    "content": "export default function a () {\n\tconsole.log( 'a' );\n}"
  },
  {
    "path": "test/bundle/input/16/b.js",
    "content": "import a from './c';\nexport default function () {\n\t// a but actually c\n\ta();\n}"
  },
  {
    "path": "test/bundle/input/16/c.js",
    "content": "export default function a () {\n\tconsole.log( 'a but actually c' );\n}"
  },
  {
    "path": "test/bundle/input/16/main.js",
    "content": "import a from './a';\nimport b from './b';\n\nfunction foo () {\n\ta();\n}"
  },
  {
    "path": "test/bundle/input/17/_config.js",
    "content": "module.exports = {\n\tdescription: 'handles shadowed renamed imports'\n};"
  },
  {
    "path": "test/bundle/input/17/foo.js",
    "content": "export function a ( message ) {\n\tconsole.log( message );\n}"
  },
  {
    "path": "test/bundle/input/17/main.js",
    "content": "import { a as b } from './foo';\n\nb();\n(function () {\n\tvar a = 'c';\n\tb( a );\n}());"
  },
  {
    "path": "test/bundle/input/18/_config.js",
    "content": "module.exports = {\n\tdescription: 'renames imports that conflict with existing variable names'\n};"
  },
  {
    "path": "test/bundle/input/18/bar.js",
    "content": "export default function () {\n\tdoThing();\n}\n\nvar doThing = function ( item ) {\n\tconsole.log( 'doing bar thing' );\n}"
  },
  {
    "path": "test/bundle/input/18/doThing.js",
    "content": "export default function () {\n\tconsole.log( 'doing foo thing' );\n}\n"
  },
  {
    "path": "test/bundle/input/18/foo.js",
    "content": "import doThing from './doThing';\n\nexport default function () {\n\tdoThing();\n}"
  },
  {
    "path": "test/bundle/input/18/main.js",
    "content": "import foo from './foo';\nimport bar from './bar';\n\n// foo();\n// bar();"
  },
  {
    "path": "test/bundle/input/19/_config.js",
    "content": "module.exports = {\n\tdescription: 'handles hasOwnProperty edge case (default imports)'\n};"
  },
  {
    "path": "test/bundle/input/19/hasOwnProperty.js",
    "content": "var hasOwnProperty = Object.prototype.hasOwnProperty;\nexport default hasOwnProperty;"
  },
  {
    "path": "test/bundle/input/19/main.js",
    "content": "import hasOwnProperty from './hasOwnProperty';\n\nconsole.log( hasOwnProperty.call({ foo: 'bar' }, 'foo' ) );"
  },
  {
    "path": "test/bundle/input/20/_config.js",
    "content": "module.exports = {\n\tdescription: 'handles hasOwnProperty edge case (named imports)',\n\texports: [ 'default' ]\n};"
  },
  {
    "path": "test/bundle/input/20/main.js",
    "content": "import { hasOwnProperty } from './objectUtils';\n\nexport default function () {\n\tconsole.log( hasOwnProperty.call({ foo: 'bar' }, 'foo' ) );\n}"
  },
  {
    "path": "test/bundle/input/20/objectUtils.js",
    "content": "export var hasOwnProperty = Object.prototype.hasOwnProperty;"
  },
  {
    "path": "test/bundle/input/21/_config.js",
    "content": "module.exports = {\n\tdescription: 'handles member assignments of named imports'\n};"
  },
  {
    "path": "test/bundle/input/21/config.js",
    "content": "export const config = {};\n"
  },
  {
    "path": "test/bundle/input/21/main.js",
    "content": "import { config } from './config';\nconfig.async = true;\n"
  },
  {
    "path": "test/bundle/input/22/_config.js",
    "content": "module.exports = {\n\tdescription: 'handles named exports of default imports',\n\tstrict: true,\n\texports: [ 'foo' ]\n};"
  },
  {
    "path": "test/bundle/input/22/foo.js",
    "content": "export default function foo () {\n\tconsole.log( 'fooing' );\n}"
  },
  {
    "path": "test/bundle/input/22/main.js",
    "content": "import foo from './foo';\n\n// foo\nfoo();\n\nexport { foo };"
  },
  {
    "path": "test/bundle/input/23/_config.js",
    "content": "module.exports = {\n\tdescription: 'throws error if module imports itself',\n\terror: /cannot import itself/\n};"
  },
  {
    "path": "test/bundle/input/23/foo.js",
    "content": "import { baz } from './foo';\n\nexport function bar () {\n\tbaz();\n}\n\nexport function baz () {\n\tconsole.log( 'bazzing' );\n}"
  },
  {
    "path": "test/bundle/input/23/main.js",
    "content": "import { bar } from './foo';\n\nbar();"
  },
  {
    "path": "test/bundle/input/24/_config.js",
    "content": "module.exports = {\n\tdescription: 'adds a banner/footer to bundle',\n\tbanner: '/* this is a banner */\\n',\n\tfooter: '\\n/* this is a footer */'\n};"
  },
  {
    "path": "test/bundle/input/24/bar.js",
    "content": "export default function bar () {\n\tconsole.log( 'baring' );\n}"
  },
  {
    "path": "test/bundle/input/24/foo.js",
    "content": "export default function foo () {\n\tconsole.log( 'fooing' );\n}"
  },
  {
    "path": "test/bundle/input/24/main.js",
    "content": "import foo from './foo';\nimport bar from './bar';\n\nfoo();\nbar();"
  },
  {
    "path": "test/bundle/input/25/_config.js",
    "content": "module.exports = {\n\tdescription: 'creates a named AMD module',\n\tamdName: 'myModule'\n};"
  },
  {
    "path": "test/bundle/input/25/foo.js",
    "content": "export default function () {\n\tconsole.log( 'fooing' );\n}"
  },
  {
    "path": "test/bundle/input/25/main.js",
    "content": "import foo from 'foo';\nfoo();"
  },
  {
    "path": "test/bundle/input/26/_config.js",
    "content": "module.exports = {\n\tdescription: 'transforms input sources',\n\ttransform: function ( source ) {\n\t\treturn source.replace( /foo/g, 'bar' );\n\t}\n};"
  },
  {
    "path": "test/bundle/input/26/bar.js",
    "content": "export default function foo () {\n\tconsole.log( 'fooing' );\n}"
  },
  {
    "path": "test/bundle/input/26/main.js",
    "content": "import foo from 'foo';\nfoo();"
  },
  {
    "path": "test/bundle/input/27/_config.js",
    "content": "module.exports = {\n\tdescription: 'correctly infers indentation with single-line edge case'\n};"
  },
  {
    "path": "test/bundle/input/27/bar.js",
    "content": "export default 'this is bar';\n"
  },
  {
    "path": "test/bundle/input/27/foo.js",
    "content": "export default 'this is foo';\n"
  },
  {
    "path": "test/bundle/input/27/main.js",
    "content": "import foo from 'foo';\nimport bar from 'bar';\n\nfunction logFoo () {\n  console.log( foo );\n}\n\nfunction logBar () {\n  console.log( bar );\n}\n"
  },
  {
    "path": "test/bundle/input/28/_config.js",
    "content": "module.exports = {\n\tdescription: 'environment GetThisBinding is always undefined'\n};"
  },
  {
    "path": "test/bundle/input/28/foo.js",
    "content": "export default () => this;\n"
  },
  {
    "path": "test/bundle/input/28/main.js",
    "content": "import foo from 'foo';\n\nassert.strictEqual( this, undefined );\n\nvar ctx = {};\nvar arrow = (x => assert.strictEqual( this, undefined ));\nvar fn = function () { assert.strictEqual( this, ctx ); };\n\narrow.call(ctx);\nfn.call(ctx);\n\nassert.strictEqual(foo(), undefined);\n"
  },
  {
    "path": "test/bundle/input/29/_config.js",
    "content": "module.exports = {\n\tdescription: 'both named and default bindings can be imported from an external module',\n\timports: [ 'foo' ],\n\tstrict: true\n};"
  },
  {
    "path": "test/bundle/input/29/main.js",
    "content": "import foo, { bar } from './foo';\n\nfoo();\nbar();"
  },
  {
    "path": "test/bundle/input/30/_config.js",
    "content": "module.exports = {\n\tdescription: 'batch import from external module',\n\timports: [ 'foo' ]\n};"
  },
  {
    "path": "test/bundle/input/30/main.js",
    "content": "import * as foo from 'foo';\n\nfoo.bar();"
  },
  {
    "path": "test/bundle/input/31/_config.js",
    "content": "module.exports = {\n\tdescription: 'renames identifiers consistently'\n};"
  },
  {
    "path": "test/bundle/input/31/exportedX.js",
    "content": "export default function someOtherName () {}\n"
  },
  {
    "path": "test/bundle/input/31/main.js",
    "content": "import x from './exportedX';\nimport './notExportedX';\n\nx();"
  },
  {
    "path": "test/bundle/input/31/notExportedX.js",
    "content": "function x () {}\n"
  },
  {
    "path": "test/bundle/input/32/_config.js",
    "content": "module.exports = {\n\tdescription: 'transformer can return an empty string',\n\ttransform: function () {\n\t\treturn '';\n\t}\n};"
  },
  {
    "path": "test/bundle/input/32/main.js",
    "content": "/* this will be discarded */"
  },
  {
    "path": "test/bundle/input/33/Math.js",
    "content": "export function add ( a, b ) {\n\treturn a + b;\n}\n\nexport function multiply ( a, b ) {\n\treturn a * b;\n}"
  },
  {
    "path": "test/bundle/input/33/Promise.js",
    "content": "var Promise = function () {};\n\nPromise.prototype = {\n\tkeep () { this.state = 'kept'; },\n\tbreak () { this.state = 'broken'; }\n};\n\nexport default Promise;"
  },
  {
    "path": "test/bundle/input/33/_config.js",
    "content": "module.exports = {\n\tdescription: 'Module names do not shadow built-ins'\n};"
  },
  {
    "path": "test/bundle/input/33/foo.js",
    "content": "var num = Math.max( 1, 2, 3 );\nvar resolved = Promise.resolve( num );\n\nexport default function foo () {\n\treturn resolved;\n}"
  },
  {
    "path": "test/bundle/input/33/main.js",
    "content": "import Promise from './Promise';\nimport * as Math from './Math';\nimport foo from './foo';\n\nvar promise = new Promise();\npromise.keep();\n\nconsole.log( Math.add( 40, 2 ) );"
  },
  {
    "path": "test/bundle/input/34/_config.js",
    "content": "module.exports = {\n\tdescription: 'avoids conflict between exports and existing variables',\n\texports: [ 'default' ]\n};"
  },
  {
    "path": "test/bundle/input/34/foo.js",
    "content": "var exports = {};\nexports.bar = function () {\n\tconsole.log( 'exports should be renamed' );\n};\n\nexport default exports;"
  },
  {
    "path": "test/bundle/input/34/main.js",
    "content": "import foo from './foo';\n\nfoo.bar();\n\nexport default 'whatever';"
  },
  {
    "path": "test/bundle/input/35/_config.js",
    "content": "var path = require( 'path' );\nvar Promise = require( 'sander' ).Promise;\nvar resolve = require( 'resolve' );\n\nmodule.exports = {\n\tdescription: 'External module paths can be resolved with resolvePath option',\n\tresolvePath: function ( importee, importer ) {\n\t\treturn new Promise( function ( fulfil, reject ) {\n\t\t\tvar callback = function ( err, result ) {\n\t\t\t\tif ( err ) {\n\t\t\t\t\treject( err );\n\t\t\t\t} else {\n\t\t\t\t\tfulfil( result );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tresolve( importee, {\n\t\t\t\tbasedir: path.dirname( importer ),\n\t\t\t\tmoduleDirectory: 'js_modules', // to avoid faffing with .gitignore\n\t\t\t\tpackageFilter: function ( pkg ) {\n\t\t\t\t\tif ( pkg[ 'jsnext:main' ] ) {\n\t\t\t\t\t\tpkg.main = pkg[ 'jsnext:main' ];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn pkg;\n\t\t\t\t}\n\t\t\t}, callback );\n\t\t});\n\t}\n};"
  },
  {
    "path": "test/bundle/input/35/js_modules/a.js",
    "content": "export default function a () {\n\tconsole.log( 'I am module a' );\n}"
  },
  {
    "path": "test/bundle/input/35/js_modules/c.js",
    "content": "export default function c () {\n\tconsole.log( 'I am module c' );\n}"
  },
  {
    "path": "test/bundle/input/35/js_modules/external/js_modules/b.js",
    "content": "import c from 'c';\n\nexport default function b () {\n\tconsole.log( 'I am module b' );\n\tc();\n}"
  },
  {
    "path": "test/bundle/input/35/js_modules/external/package.json",
    "content": "{\n\t\"name\": \"external\",\n\t\"version\": \"0.1.0\",\n\t\"main\": \"dist/external.js\",\n\t\"jsnext:main\": \"src/external.js\"\n}"
  },
  {
    "path": "test/bundle/input/35/js_modules/external/src/external.js",
    "content": "import a from 'a';\nimport b from 'b';\n\nexport default function external () {\n\tconsole.log( 'I am an external dependency' );\n\ta();\n\tb();\n}"
  },
  {
    "path": "test/bundle/input/35/main.js",
    "content": "import external from 'external';\n\nexternal();"
  },
  {
    "path": "test/bundle/input/36/_config.js",
    "content": "var path = require( 'path' );\nvar Promise = require( 'sander' ).Promise;\nvar resolve = require( 'resolve' );\n\nmodule.exports = {\n\tdescription: 'External module paths can be resolved with resolvePath option',\n\tresolvePath: function ( importee, importer ) {\n\t\treturn new Promise( function ( fulfil, reject ) {\n\t\t\tvar callback = function ( err, result ) {\n\t\t\t\tif ( err ) {\n\t\t\t\t\treject( err );\n\t\t\t\t} else {\n\t\t\t\t\tfulfil( result );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tresolve( importee, {\n\t\t\t\tbasedir: path.dirname( importer ),\n\t\t\t\tmoduleDirectory: 'js_modules', // to avoid faffing with .gitignore\n\t\t\t\tpackageFilter: function ( pkg ) {\n\t\t\t\t\tif ( pkg[ 'jsnext:main' ] ) {\n\t\t\t\t\t\tpkg.main = pkg[ 'jsnext:main' ];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn pkg;\n\t\t\t\t}\n\t\t\t}, callback );\n\t\t});\n\t}\n};"
  },
  {
    "path": "test/bundle/input/36/js_modules/external/package.json",
    "content": "{\n\t\"name\": \"external\",\n\t\"version\": \"0.1.0\",\n\t\"main\": \"dist/external.js\",\n\t\"jsnext:main\": \"src/external.js\"\n}"
  },
  {
    "path": "test/bundle/input/36/js_modules/external/src/dependsOnExternal.js",
    "content": "import external from './external';\n\nexport default function dependsOnExternal () {\n\tconsole.log( external.message );\n}"
  },
  {
    "path": "test/bundle/input/36/js_modules/external/src/external.js",
    "content": "import dependsOnExternal from './dependsOnExternal';\n\nexport default function external () {\n\tdependsOnExternal();\n}\n\nexternal.message = 'don\\'t try this at home';"
  },
  {
    "path": "test/bundle/input/36/main.js",
    "content": "import external from 'external';\n\nexternal();"
  },
  {
    "path": "test/bundle/input/37/_config.js",
    "content": "module.exports = {\n\tdescription: 'Clashes with external dependency names are handled',\n\timports: [ 'moment' ]\n};"
  },
  {
    "path": "test/bundle/input/37/a.js",
    "content": "var x = 'wut';\nexport default x;"
  },
  {
    "path": "test/bundle/input/37/main.js",
    "content": "import x from \"moment\";\nimport a from './a';"
  },
  {
    "path": "test/bundle/input/38/_config.js",
    "content": "module.exports = {\n\tdescription: 'Export reassignments are deconflicted'\n};\n"
  },
  {
    "path": "test/bundle/input/38/foo.js",
    "content": "export default notActuallyFoo;\n\nfunction notActuallyFoo () {\n\tfoo();\n}\n\nfunction foo () {\n\tconsole.log( 'actually foo' );\n}\n"
  },
  {
    "path": "test/bundle/input/38/main.js",
    "content": "import foo from './foo';\n\nfoo();\n"
  },
  {
    "path": "test/bundle/input/39/_config.js",
    "content": "module.exports = {\n\tdescription: 'avoids naming collisions between imports',\n\terror: /Duplicated import \\('x'\\)/\n};\n"
  },
  {
    "path": "test/bundle/input/39/bar.js",
    "content": "export default function () {}\n"
  },
  {
    "path": "test/bundle/input/39/foo.js",
    "content": "export default function () {}\n"
  },
  {
    "path": "test/bundle/input/39/main.js",
    "content": "import x from './foo';\nimport x from './bar';\n\nx();\n"
  },
  {
    "path": "test/bundle/input/40/_config.js",
    "content": "module.exports = {\n\tdescription: 'removes existing sourcemap comments'\n};\n"
  },
  {
    "path": "test/bundle/input/40/foo.js",
    "content": "export default function foo () {\n\tconsole.log( 'foo' );\n}\n\n//# sourceMappingURL=foo.js.map"
  },
  {
    "path": "test/bundle/input/40/main.js",
    "content": "import foo from './foo';\n\nfoo();\n\n//# sourceMappingURL=main.js.map"
  },
  {
    "path": "test/bundle/input/42/_config.js",
    "content": "module.exports = {\n\tdescription: 'removes comments without blowing up'\n};"
  },
  {
    "path": "test/bundle/input/42/foo.js",
    "content": "function foo () {\n\tconsole.log( 'foo' );\n}\nexport { foo };\n//# sourceMappingURL=foo.js.map"
  },
  {
    "path": "test/bundle/input/42/main.js",
    "content": "import { foo } from './foo';\nfoo();\n//# sourceMappingURL=main.js.map"
  },
  {
    "path": "test/bundle/input/43/_config.js",
    "content": "module.exports = {\n\tdescription: 'bundles class with super (#129)',\n\timports: [ 'bar' ]\n};"
  },
  {
    "path": "test/bundle/input/43/main.js",
    "content": "import Bar from 'bar';\n\nclass Foo extends Bar {\n\tconstructor() {\n\t\tsuper();\n\t\tconsole.log('Foo constructed');\n\t}\n}\n"
  },
  {
    "path": "test/bundle/input/44/_config.js",
    "content": "module.exports = {\n\tdescription: 'avoids conflicts between imports and declarations not in root scope',\n\timports: [ 'foo', 'bar' ]\n};"
  },
  {
    "path": "test/bundle/input/44/a.js",
    "content": "import foo from 'foo';"
  },
  {
    "path": "test/bundle/input/44/b.js",
    "content": "import foo from 'bar';\n\n(function () {\n\tvar bar = 'nope';\n\tfoo();\n})();"
  },
  {
    "path": "test/bundle/input/44/main.js",
    "content": "import './a';\nimport './b';"
  },
  {
    "path": "test/bundle/input/45/_config.js",
    "content": "module.exports = {\n\tdescription: 'uses supplied code',\n\tmodules: {\n\t\t'main.js': 'import foo from \\'./foo\\';\\nfoo();',\n\t\t'foo/index.js': 'import bar from \\'./bar\\';\\nexport default function foo () {\\n\\tconsole.log( bar );\\n}',\n\t\t'foo/bar.js': 'export default 42;'\n\t}\n};"
  },
  {
    "path": "test/bundle/input/46/_config.js",
    "content": "module.exports = {\n\tdescription: 'uses supplied AST',\n\tmodules: {\n\t\t'main.js': 'import foo from \\'./foo\\';\\nfoo();',\n\n\t\t// the code points to './bar' but the AST points to './baz', so we\n\t\t// can check the AST is being used\n\t\t'foo/index.js': {\n\t\t\tcode: 'import bar from \\'./bar\\';\\nexport default function foo () {\\n\\tconsole.log( bar );\\n}',\n\t\t\tast: {\n\t\t\t\tstart: 0,\n\t\t\t\tbody: [\n\t\t\t\t{\n\t\t\t\t\tstart: 0,\n\t\t\t\t\tspecifiers: [{\n\t\t\t\t\t\tstart: 7,\n\t\t\t\t\t\tlocal: {\n\t\t\t\t\t\t\tstart: 7,\n\t\t\t\t\t\t\tname: \"bar\",\n\t\t\t\t\t\t\ttype: \"Identifier\",\n\t\t\t\t\t\t\tend: 10\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttype: \"ImportDefaultSpecifier\",\n\t\t\t\t\t\tend: 10\n\t\t\t\t\t}],\n\t\t\t\t\tsource: {\n\t\t\t\t\t\tstart: 16,\n\t\t\t\t\t\tvalue: \"./baz\",\n\t\t\t\t\t\traw: \"\\'./baz\\'\",\n\t\t\t\t\t\ttype: \"Literal\",\n\t\t\t\t\t\tend: 23\n\t\t\t\t\t},\n\t\t\t\t\ttype: \"ImportDeclaration\",\n\t\t\t\t\tend: 24\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tstart: 25,\n\t\t\t\t\tdeclaration: {\n\t\t\t\t\t\tstart: 40,\n\t\t\t\t\t\tid: {\n\t\t\t\t\t\t\tstart: 49,\n\t\t\t\t\t\t\tname: \"foo\",\n\t\t\t\t\t\t\ttype: \"Identifier\",\n\t\t\t\t\t\t\tend: 52\n\t\t\t\t\t\t},\n\t\t\t\t\t\tgenerator: false,\n\t\t\t\t\t\texpression: false,\n\t\t\t\t\t\tparams: [],\n\t\t\t\t\t\tbody: {\n\t\t\t\t\t\t\tstart: 56,\n\t\t\t\t\t\t\tbody: [{\n\t\t\t\t\t\t\t\tstart: 59,\n\t\t\t\t\t\t\t\texpression: {\n\t\t\t\t\t\t\t\t\tstart: 59,\n\t\t\t\t\t\t\t\t\tcallee: {\n\t\t\t\t\t\t\t\t\t\tstart: 59,\n\t\t\t\t\t\t\t\t\t\tobject: {\n\t\t\t\t\t\t\t\t\t\t\tstart: 59,\n\t\t\t\t\t\t\t\t\t\t\tname: \"console\",\n\t\t\t\t\t\t\t\t\t\t\ttype: \"Identifier\",\n\t\t\t\t\t\t\t\t\t\t\tend: 66\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tproperty: {\n\t\t\t\t\t\t\t\t\t\t\tstart: 67,\n\t\t\t\t\t\t\t\t\t\t\tname: \"log\",\n\t\t\t\t\t\t\t\t\t\t\ttype: \"Identifier\",\n\t\t\t\t\t\t\t\t\t\t\tend: 70\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tcomputed: false,\n\t\t\t\t\t\t\t\t\t\ttype: \"MemberExpression\",\n\t\t\t\t\t\t\t\t\t\tend: 70\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\targuments: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tstart: 72,\n\t\t\t\t\t\t\t\t\t\tname: \"bar\",\n\t\t\t\t\t\t\t\t\t\ttype: \"Identifier\",\n\t\t\t\t\t\t\t\t\t\tend: 75\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\ttype: \"CallExpression\",\n\t\t\t\t\t\t\t\t\tend: 77\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\ttype: \"ExpressionStatement\",\n\t\t\t\t\t\t\t\tend: 78\n\t\t\t\t\t\t\t}],\n\t\t\t\t\t\t\ttype: \"BlockStatement\",\n\t\t\t\t\t\t\tend: 80\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttype: \"FunctionDeclaration\",\n\t\t\t\t\t\tend: 80\n\t\t\t\t\t},\n\t\t\t\t\ttype: \"ExportDefaultDeclaration\",\n\t\t\t\t\tend: 80\n\t\t\t\t}],\n\t\t\t\tsourceType: \"module\",\n\t\t\t\ttype: \"Program\",\n\t\t\t\tend: 80\n\t\t\t}\n\t\t},\n\t\t'foo/baz.js': 'export default 42;'\n\t}\n};"
  },
  {
    "path": "test/bundle/input/47/_config.js",
    "content": "module.exports = {\n\tdescription: 'omits use strict if necessary',\n\tuseStrict: false\n};"
  },
  {
    "path": "test/bundle/input/47/main.js",
    "content": "implicitGlobal = 'lol';"
  },
  {
    "path": "test/bundle/input/48/_config.js",
    "content": "module.exports = {\n\tdescription: 'handles resolvePath failure',\n\tresolvePath: function ( importee ) {\n\t\tif ( importee[0] !== '.' ) return null;\n\t\treturn importee;\n\t},\n\timports: [ 'external' ]\n};"
  },
  {
    "path": "test/bundle/input/48/main.js",
    "content": "import external from 'external';\nexternal();"
  },
  {
    "path": "test/bundle/input/49/_config.js",
    "content": "module.exports = {\n\tdescription: 'generates inline sourcemap',\n\tsourceMap: 'inline'\n};"
  },
  {
    "path": "test/bundle/input/49/foo.js",
    "content": "export default function foo () {\n\tconsole.log( 'foo' );\n}"
  },
  {
    "path": "test/bundle/input/49/main.js",
    "content": "import foo from './foo';\nfoo();"
  },
  {
    "path": "test/bundle/input/50/A.js",
    "content": "import B from './B';\n\nexport default class A {\n\tconstructor () {\n\t\tconsole.log( 'creating A' );\n\t}\n\n\tb () {\n\t\treturn new B();\n\t}\n}"
  },
  {
    "path": "test/bundle/input/50/B.js",
    "content": "import A from './A';\n\nexport default class B extends A {\n\tconstructor () {\n\t\tconsole.log( 'creating B' );\n\t}\n}"
  },
  {
    "path": "test/bundle/input/50/C.js",
    "content": "import D from './D';\n\nexport default class C extends D {\n\tconstructor () {\n\t\tconsole.log( 'creating C' );\n\t}\n}"
  },
  {
    "path": "test/bundle/input/50/D.js",
    "content": "import C from './C';\n\nexport default class D {\n\tconstructor () {\n\t\tconsole.log( 'creating D' );\n\t}\n\n\tc () {\n\t\treturn new C();\n\t}\n}"
  },
  {
    "path": "test/bundle/input/50/_config.js",
    "content": "module.exports = {\n\tdescription: 'cyclical dependency order is resolved based on need (#152)',\n\t//solo: true\n};"
  },
  {
    "path": "test/bundle/input/50/main.js",
    "content": "import A from './A';\nimport B from './B';\n\nimport C from './C';\nimport D from './D';\n\nnew A().b();\nnew B();\nnew C();\nnew D().c();"
  },
  {
    "path": "test/bundle/input/51/_config.js",
    "content": "module.exports = {\n\tdescription: 'leaves trailing .js in external package name',\n\timports: [ 'highlight.js' ]\n};"
  },
  {
    "path": "test/bundle/input/51/foo.js",
    "content": "export default 42;"
  },
  {
    "path": "test/bundle/input/51/main.js",
    "content": "import highlight from 'highlight.js';\nimport foo from './foo.js';"
  },
  {
    "path": "test/bundle/input/52/_config.js",
    "content": "var path = require( 'path' );\n\nmodule.exports = {\n\tdescription: 'correctly renames bindings from modules referred to by local and external-ish modules',\n\tresolvePath: function ( importee ) {\n\t\treturn path.resolve( __dirname, 'external', importee.slice( 4 ) ) + '.js';\n\t}\n};"
  },
  {
    "path": "test/bundle/input/52/bar.js",
    "content": "import baz from 'ext/baz';\n\n// bar.js\nconsole.log( 'baz', baz );"
  },
  {
    "path": "test/bundle/input/52/external/baz.js",
    "content": "export default function () {\n\t// baz.js\n};"
  },
  {
    "path": "test/bundle/input/52/external/foo.js",
    "content": "import not_baz from './baz';\n\n// foo.js"
  },
  {
    "path": "test/bundle/input/52/main.js",
    "content": "import 'ext/foo';\nimport './bar';\n\n// main.js"
  },
  {
    "path": "test/bundle/input/53/_config.js",
    "content": "module.exports = {\n\tdescription: 'allows modules to depend on entry module',\n\texports: [ 'default' ]\n};"
  },
  {
    "path": "test/bundle/input/53/foo.js",
    "content": "import main from './main';\n\nexport default function () {\n\tconsole.log( 'foo' );\n}"
  },
  {
    "path": "test/bundle/input/53/main.js",
    "content": "import foo from './foo';\n\nfoo();\n\nexport default function () {\n\tconsole.log( 'main' );\n}"
  },
  {
    "path": "test/bundle/input/54/_config.js",
    "content": "module.exports = {\n\tdescription: 'allows multiple modules to share an external package',\n\timports: [ 'bluebird' ]\n};"
  },
  {
    "path": "test/bundle/input/54/foo.js",
    "content": "import Promise from 'bluebird';\nexport default 'foo';"
  },
  {
    "path": "test/bundle/input/54/main.js",
    "content": "import Promise from 'bluebird';\nimport foo from './foo';"
  },
  {
    "path": "test/bundle/input/55/A.js",
    "content": "import B from './B';\nimport C from './C';\n\nclass A {\n\tb () {\n\t\treturn new B();\n\t}\n\n\tc () {\n\t\treturn new C();\n\t}\n}\n\nexport default A;\n"
  },
  {
    "path": "test/bundle/input/55/B.js",
    "content": "import A from './A';\n\nclass B extends A {}\n\nexport default B;\n"
  },
  {
    "path": "test/bundle/input/55/C.js",
    "content": "import A from './A';\n\nclass C extends A {}\n\nexport default C;\n"
  },
  {
    "path": "test/bundle/input/55/_config.js",
    "content": "module.exports = {\n\tdescription: 'handles more complex mutually dependent module scenario (#157)'\n};"
  },
  {
    "path": "test/bundle/input/55/main.js",
    "content": "import A from './A';"
  },
  {
    "path": "test/bundle/input/56/_config.js",
    "content": "module.exports = {\n\tdescription: 'default exports are not live'\n};"
  },
  {
    "path": "test/bundle/input/56/foo.js",
    "content": "var foo = 42;\nexport default foo;\nfoo = 99;\nfoo += 1;\nfoo++;"
  },
  {
    "path": "test/bundle/input/56/main.js",
    "content": "import foo from './foo';\n\nconsole.log( foo ); // 42"
  },
  {
    "path": "test/bundle/input/57/_config.js",
    "content": "module.exports = {\n\tdescription: 'correctly exports x as y inside a bundle'\n};\n"
  },
  {
    "path": "test/bundle/input/57/foo.js",
    "content": "var x = 42;\n\nexport { x as y };\n"
  },
  {
    "path": "test/bundle/input/57/main.js",
    "content": "import * as foo from './foo';\n\nconsole.log( foo.y );\n"
  },
  {
    "path": "test/bundle/input/58/_config.js",
    "content": "module.exports = {\n\tdescription: 'correctly exports x as y from a bundle',\n\texports: [ 'y' ],\n\tstrict: true\n};\n"
  },
  {
    "path": "test/bundle/input/58/main.js",
    "content": "var x = 42;\n\nexport { x as y };\n"
  },
  {
    "path": "test/bundle/input/59/_config.js",
    "content": "module.exports = {\n\tdescription: 'correctly handles renamed exports within a bundle'\n};\n"
  },
  {
    "path": "test/bundle/input/59/foo.js",
    "content": "var foo = 'foo';\nexport { foo as bar };\n"
  },
  {
    "path": "test/bundle/input/59/main.js",
    "content": "import { bar } from './foo';\n\nconsole.log( bar ); // 'foo'\n"
  },
  {
    "path": "test/bundle/input/60/_config.js",
    "content": "module.exports = {\r\n\tdescription: 'preserves comments after imports'\r\n};\r\n"
  },
  {
    "path": "test/bundle/input/60/bar.js",
    "content": "var bar = 'bar';\r\nexport { bar };\r\n"
  },
  {
    "path": "test/bundle/input/60/foo.js",
    "content": "var foo = 'foo';\r\nexport { foo };\r\n"
  },
  {
    "path": "test/bundle/input/60/main.js",
    "content": "import { foo } from './foo';\r\nimport { bar } from './bar';\r\n\r\n// Preserve comments after imports\r\n\r\nconsole.log( foo );\r\n"
  },
  {
    "path": "test/bundle/output/amd/01.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar message = 'yes';\n\tvar foo = message;\n\n\tconsole.log( foo );\n\n});"
  },
  {
    "path": "test/bundle/output/amd/02.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar message = 'yes';\n\tvar foo = message;\n\n\tconsole.log( foo );\n\n});"
  },
  {
    "path": "test/bundle/output/amd/03.js",
    "content": "define(['external'], function (external) {\n\n\t'use strict';\n\n\texternal = ('default' in external ? external['default'] : external);\n\n\tvar bar = 'yes';\n\tvar foo = bar;\n\n\tconsole.log( external( foo ) );\n\n});"
  },
  {
    "path": "test/bundle/output/amd/04.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\tvar answer = 42;\n\n\tvar main = answer * 2;\n\n\texports['default'] = main;\n\n});"
  },
  {
    "path": "test/bundle/output/amd/05.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\tvar one = 1;\n\tvar two = 2;\n\tvar three = 3;\n\n\tvar four = one + 3;\n\tvar five = two + 3;\n\tvar six = three + 3;\n\n\tfour = 99;\n\n\texports.four = four;\n\texports.five = five;\n\texports.six = six;\n\n});"
  },
  {
    "path": "test/bundle/output/amd/06.js",
    "content": "define(['utils/external'], function (external) {\n\n\t'use strict';\n\n\texternal = ('default' in external ? external['default'] : external);\n\n\tvar message = 'this is a message';\n\n\tconsole.log( message );\n\n});"
  },
  {
    "path": "test/bundle/output/amd/07.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar foo = 'this is foo';\n\n\tfunction logFoo () {\n\t\tconsole.log( foo );\n\t}\n\n\tfunction logBar () {\n\t\tconsole.log( bar );\n\t}\n\n});"
  },
  {
    "path": "test/bundle/output/amd/08.js",
    "content": "define(['external'], function (ImplicitlyNamed) {\n\n\t'use strict';\n\n\tImplicitlyNamed = ('default' in ImplicitlyNamed ? ImplicitlyNamed['default'] : ImplicitlyNamed);\n\n});"
  },
  {
    "path": "test/bundle/output/amd/09.js",
    "content": "define(['external'], function (Correct) {\n\n\t'use strict';\n\n\tCorrect = ('default' in Correct ? Correct['default'] : Correct);\n\n});"
  },
  {
    "path": "test/bundle/output/amd/10.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\tclass Foo {\n\t\tconstructor( str ) {\n\t\t\tthis.str = str;\n\t\t}\n\n\t\ttoString() {\n\t\t\treturn this.str;\n\t\t}\n\t}\n\n\texports['default'] = Foo;\n\n});"
  },
  {
    "path": "test/bundle/output/amd/11.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\tvar foo = 1;\n\tvar bar = 2;\n\n\tfoo = 3;\n\n\texports.foo = foo;\n\texports.bar = bar;\n\n\tvar baz = 4;\n\n\texports.baz = baz;\n\n\tvar qux = 5;\n\tqux = 6;\n\n\texports.qux = qux;\n\n});"
  },
  {
    "path": "test/bundle/output/amd/14.js",
    "content": "define(['external'], function (foo) {\n\n\t'use strict';\n\n\tfoo = ('default' in foo ? foo['default'] : foo);\n\n\tfoo();\n\n});"
  },
  {
    "path": "test/bundle/output/amd/15.js",
    "content": "define(['external'], function (external) {\n\n\t'use strict';\n\n\texternal.foo();\n\n});"
  },
  {
    "path": "test/bundle/output/amd/16.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction _a__a () {\n\t\tconsole.log( 'a' );\n\t}\n\n\tfunction c__a () {\n\t\tconsole.log( 'a but actually c' );\n\t}\n\n\tvar b = function () {\n\t\t// a but actually c\n\t\tc__a();\n\t}\n\n\tfunction foo () {\n\t\t_a__a();\n\t}\n\n});"
  },
  {
    "path": "test/bundle/output/amd/17.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction foo__a ( message ) {\n\t\tconsole.log( message );\n\t}\n\n\tfoo__a();\n\t(function () {\n\t\tvar a = 'c';\n\t\tfoo__a( a );\n\t}());\n\n});"
  },
  {
    "path": "test/bundle/output/amd/18.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar _doThing = function () {\n\t\tconsole.log( 'doing foo thing' );\n\t}\n\n\tvar foo = function () {\n\t\t_doThing();\n\t}\n\n\tvar bar = function () {\n\t\tdoThing();\n\t}\n\n\tvar doThing = function ( item ) {\n\t\tconsole.log( 'doing bar thing' );\n\t}\n\n\n\n});"
  },
  {
    "path": "test/bundle/output/amd/19.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\tconsole.log( hasOwnProperty.call({ foo: 'bar' }, 'foo' ) );\n\n});"
  },
  {
    "path": "test/bundle/output/amd/20.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\tvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\tvar main = function () {\n\t\tconsole.log( hasOwnProperty.call({ foo: 'bar' }, 'foo' ) );\n\t}\n\n\texports['default'] = main;\n\n});"
  },
  {
    "path": "test/bundle/output/amd/21.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tconst config = {};\n\n\tconfig.async = true;\n\n});"
  },
  {
    "path": "test/bundle/output/amd/22.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'fooing' );\n\t}\n\n\texports.foo = foo;\n\n\t// foo\n\tfoo();\n\n});"
  },
  {
    "path": "test/bundle/output/amd/24.js",
    "content": "/* this is a banner */\ndefine(function () {\n\n\t'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'fooing' );\n\t}\n\n\tfunction bar () {\n\t\tconsole.log( 'baring' );\n\t}\n\n\tfoo();\n\tbar();\n\n});\n/* this is a footer */"
  },
  {
    "path": "test/bundle/output/amd/25.js",
    "content": "define('myModule', function () {\n\n\t'use strict';\n\n\tvar foo = function () {\n\t\tconsole.log( 'fooing' );\n\t}\n\n\tfoo();\n\n});"
  },
  {
    "path": "test/bundle/output/amd/26.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction bar () {\n\t\tconsole.log( 'baring' );\n\t}\n\n\tbar();\n\n});"
  },
  {
    "path": "test/bundle/output/amd/27.js",
    "content": "define(function () {\n\n  'use strict';\n\n  var foo = 'this is foo';\n\n  var bar = 'this is bar';\n\n  function logFoo () {\n    console.log( foo );\n  }\n\n  function logBar () {\n    console.log( bar );\n  }\n\n});"
  },
  {
    "path": "test/bundle/output/amd/28.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar foo = () => undefined;\n\n\tassert.strictEqual( undefined, undefined );\n\n\tvar ctx = {};\n\tvar arrow = (x => assert.strictEqual( undefined, undefined ));\n\tvar fn = function () { assert.strictEqual( this, ctx ); };\n\n\tarrow.call(ctx);\n\tfn.call(ctx);\n\n\tassert.strictEqual(foo(), undefined);\n\n});"
  },
  {
    "path": "test/bundle/output/amd/29.js",
    "content": "define(['foo'], function (foo) {\n\n\t'use strict';\n\n\tvar foo__default = ('default' in foo ? foo['default'] : foo);\n\n\tfoo__default();\n\tfoo.bar();\n\n});"
  },
  {
    "path": "test/bundle/output/amd/30.js",
    "content": "define(['foo'], function (foo) {\n\n\t'use strict';\n\n\tfoo.bar();\n\n});"
  },
  {
    "path": "test/bundle/output/amd/31.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction someOtherName () {}\n\n\tfunction x () {}\n\n\tsomeOtherName();\n\n});"
  },
  {
    "path": "test/bundle/output/amd/32.js",
    "content": "define(function () {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/bundle/output/amd/33.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar _Promise__Promise = function () {};\n\n\t_Promise__Promise.prototype = {\n\t\tkeep () { this.state = 'kept'; },\n\t\tbreak () { this.state = 'broken'; }\n\t};\n\n\tvar _Promise = _Promise__Promise;\n\n\tvar _Math = {\n\t\tget add () { return add; },\n\t\tget multiply () { return multiply; }\n\t};\n\n\tfunction add ( a, b ) {\n\t\treturn a + b;\n\t}\n\n\tfunction multiply ( a, b ) {\n\t\treturn a * b;\n\t}\n\n\tvar num = Math.max( 1, 2, 3 );\n\tvar resolved = Promise.resolve( num );\n\n\tfunction foo () {\n\t\treturn resolved;\n\t}\n\n\tvar promise = new _Promise();\n\tpromise.keep();\n\n\tconsole.log( _Math.add( 40, 2 ) );\n\n});"
  },
  {
    "path": "test/bundle/output/amd/34.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\tvar foo__exports = {};\n\tfoo__exports.bar = function () {\n\t\tconsole.log( 'exports should be renamed' );\n\t};\n\n\tvar foo = foo__exports;\n\n\tfoo.bar();\n\n\tvar main = 'whatever';\n\n\texports['default'] = main;\n\n});"
  },
  {
    "path": "test/bundle/output/amd/35.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction a () {\n\t\tconsole.log( 'I am module a' );\n\t}\n\n\tfunction c () {\n\t\tconsole.log( 'I am module c' );\n\t}\n\n\tfunction b () {\n\t\tconsole.log( 'I am module b' );\n\t\tc();\n\t}\n\n\tfunction external () {\n\t\tconsole.log( 'I am an external dependency' );\n\t\ta();\n\t\tb();\n\t}\n\n\texternal();\n\n});"
  },
  {
    "path": "test/bundle/output/amd/36.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction dependsOnExternal () {\n\t\tconsole.log( external.message );\n\t}\n\n\tfunction external () {\n\t\tdependsOnExternal();\n\t}\n\n\texternal.message = 'don\\'t try this at home';\n\n\texternal();\n\n});"
  },
  {
    "path": "test/bundle/output/amd/37.js",
    "content": "define(['moment'], function (x) {\n\n\t'use strict';\n\n\tx = ('default' in x ? x['default'] : x);\n\n\tvar a__x = 'wut';\n\tvar a = a__x;\n\n\n\n});"
  },
  {
    "path": "test/bundle/output/amd/38.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar _foo = notActuallyFoo;\n\n\tfunction notActuallyFoo () {\n\t\tfoo();\n\t}\n\n\tfunction foo () {\n\t\tconsole.log( 'actually foo' );\n\t}\n\n\t_foo();\n\n});"
  },
  {
    "path": "test/bundle/output/amd/40.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n});"
  },
  {
    "path": "test/bundle/output/amd/42.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n});"
  },
  {
    "path": "test/bundle/output/amd/43.js",
    "content": "define(['bar'], function (Bar) {\n\n\t'use strict';\n\n\tBar = ('default' in Bar ? Bar['default'] : Bar);\n\n\tclass Foo extends Bar {\n\t\tconstructor() {\n\t\t\tsuper();\n\t\t\tconsole.log('Foo constructed');\n\t\t}\n\t}\n\n});"
  },
  {
    "path": "test/bundle/output/amd/44.js",
    "content": "define(['foo', 'bar'], function (foo, _bar) {\n\n\t'use strict';\n\n\tfoo = ('default' in foo ? foo['default'] : foo);\n\t_bar = ('default' in _bar ? _bar['default'] : _bar);\n\n\n\n\t(function () {\n\t\tvar bar = 'nope';\n\t\t_bar();\n\t})();\n\n\n\n});"
  },
  {
    "path": "test/bundle/output/amd/45.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar bar = 42;\n\n\tfunction foo () {\n\t\tconsole.log( bar );\n\t}\n\n\tfoo();\n\n});"
  },
  {
    "path": "test/bundle/output/amd/46.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar bar = 42;\n\n\tfunction foo () {\n\t\tconsole.log( bar );\n\t}\n\n\tfoo();\n\n});"
  },
  {
    "path": "test/bundle/output/amd/47.js",
    "content": "define(function () {\n\n\timplicitGlobal = 'lol';\n\n});"
  },
  {
    "path": "test/bundle/output/amd/48.js",
    "content": "define(['external'], function (external) {\n\n\t'use strict';\n\n\texternal = ('default' in external ? external['default'] : external);\n\n\texternal();\n\n});"
  },
  {
    "path": "test/bundle/output/amd/49.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n});\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,xyz"
  },
  {
    "path": "test/bundle/output/amd/50.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tclass A {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating A' );\n\t\t}\n\n\t\tb () {\n\t\t\treturn new B();\n\t\t}\n\t}\n\n\tclass B extends A {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating B' );\n\t\t}\n\t}\n\n\tclass D {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating D' );\n\t\t}\n\n\t\tc () {\n\t\t\treturn new C();\n\t\t}\n\t}\n\n\tclass C extends D {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating C' );\n\t\t}\n\t}\n\n\tnew A().b();\n\tnew B();\n\tnew C();\n\tnew D().c();\n\n});"
  },
  {
    "path": "test/bundle/output/amd/51.js",
    "content": "define(['highlight.js'], function (highlight) {\n\n\t'use strict';\n\n\thighlight = ('default' in highlight ? highlight['default'] : highlight);\n\n\tvar foo = 42;\n\n\n\n});"
  },
  {
    "path": "test/bundle/output/amd/52.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar not_baz = function () {\n\t\t// baz.js\n\t};\n\n\n\n\t// bar.js\n\tconsole.log( 'baz', not_baz );\n\n\n\n});"
  },
  {
    "path": "test/bundle/output/amd/53.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\tvar foo = function () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n\tvar main = function () {\n\t\tconsole.log( 'main' );\n\t}\n\n\texports['default'] = main;\n\n});"
  },
  {
    "path": "test/bundle/output/amd/54.js",
    "content": "define(['bluebird'], function (bluebird) {\n\n\t'use strict';\n\n\tbluebird = ('default' in bluebird ? bluebird['default'] : bluebird);\n\n\tvar foo = 'foo';\n\n\n\n});"
  },
  {
    "path": "test/bundle/output/amd/55.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tclass A {\n\t\tb () {\n\t\t\treturn new B();\n\t\t}\n\n\t\tc () {\n\t\t\treturn new C();\n\t\t}\n\t}\n\n\tclass B extends A {}\n\n\tclass C extends A {}\n\n\n\n});"
  },
  {
    "path": "test/bundle/output/amd/56.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar foo = 42;\n\tvar _foo = foo;\n\tfoo = 99;\n\tfoo += 1;\n\tfoo++;\n\n\tconsole.log( _foo ); // 42\n\n});"
  },
  {
    "path": "test/bundle/output/amd/57.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar foo = {\n\t\tget y () { return x; }\n\t};\n\n\tvar x = 42;\n\n\tconsole.log( foo.y );\n\n});"
  },
  {
    "path": "test/bundle/output/amd/58.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\tvar x = 42;\n\n\texports.y = x;\n\n});"
  },
  {
    "path": "test/bundle/output/amd/59.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar foo = 'foo';\n\n\tconsole.log( foo ); // 'foo'\n\n});"
  },
  {
    "path": "test/bundle/output/amd/60.js",
    "content": "define(function () {\r\n\r\n\t'use strict';\r\n\r\n\tvar foo = 'foo';\r\n\r\n\tvar bar = 'bar';\r\n\r\n\t// Preserve comments after imports\r\n\r\n\tconsole.log( foo );\r\n\r\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/01.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar message = 'yes';\n\tvar foo = message;\n\n\tconsole.log( foo );\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/02.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar message = 'yes';\n\tvar foo = message;\n\n\tconsole.log( foo );\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/03.js",
    "content": "define(['external'], function (external) {\n\n\t'use strict';\n\n\tvar bar = 'yes';\n\tvar foo = bar;\n\n\tconsole.log( external( foo ) );\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/04.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar answer = 42;\n\n\tvar main = answer * 2;\n\n\treturn main;\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/06.js",
    "content": "define(['utils/external'], function (external) {\n\n\t'use strict';\n\n\tvar message = 'this is a message';\n\n\tconsole.log( message );\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/07.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar foo = 'this is foo';\n\n\tfunction logFoo () {\n\t\tconsole.log( foo );\n\t}\n\n\tfunction logBar () {\n\t\tconsole.log( bar );\n\t}\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/08.js",
    "content": "define(['external'], function (ImplicitlyNamed) {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/09.js",
    "content": "define(['external'], function (Correct) {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/10.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tclass Foo {\n\t\tconstructor( str ) {\n\t\t\tthis.str = str;\n\t\t}\n\n\t\ttoString() {\n\t\t\treturn this.str;\n\t\t}\n\t}\n\n\treturn Foo;\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/14.js",
    "content": "define(['external'], function (foo) {\n\n\t'use strict';\n\n\tfoo();\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/16.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction _a__a () {\n\t\tconsole.log( 'a' );\n\t}\n\n\tfunction c__a () {\n\t\tconsole.log( 'a but actually c' );\n\t}\n\n\tvar b = function () {\n\t\t// a but actually c\n\t\tc__a();\n\t}\n\n\tfunction foo () {\n\t\t_a__a();\n\t}\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/17.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction foo__a ( message ) {\n\t\tconsole.log( message );\n\t}\n\n\tfoo__a();\n\t(function () {\n\t\tvar a = 'c';\n\t\tfoo__a( a );\n\t}());\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/18.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar _doThing = function () {\n\t\tconsole.log( 'doing foo thing' );\n\t}\n\n\tvar foo = function () {\n\t\t_doThing();\n\t}\n\n\tvar bar = function () {\n\t\tdoThing();\n\t}\n\n\tvar doThing = function ( item ) {\n\t\tconsole.log( 'doing bar thing' );\n\t}\n\n\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/19.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\tconsole.log( hasOwnProperty.call({ foo: 'bar' }, 'foo' ) );\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/20.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\tvar main = function () {\n\t\tconsole.log( hasOwnProperty.call({ foo: 'bar' }, 'foo' ) );\n\t}\n\n\treturn main;\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/21.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tconst config = {};\n\n\tconfig.async = true;\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/24.js",
    "content": "/* this is a banner */\ndefine(function () {\n\n\t'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'fooing' );\n\t}\n\n\tfunction bar () {\n\t\tconsole.log( 'baring' );\n\t}\n\n\tfoo();\n\tbar();\n\n});\n/* this is a footer */"
  },
  {
    "path": "test/bundle/output/amdDefaults/25.js",
    "content": "define('myModule', function () {\n\n\t'use strict';\n\n\tvar foo = function () {\n\t\tconsole.log( 'fooing' );\n\t}\n\n\tfoo();\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/26.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction bar () {\n\t\tconsole.log( 'baring' );\n\t}\n\n\tbar();\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/27.js",
    "content": "define(function () {\n\n  'use strict';\n\n  var foo = 'this is foo';\n\n  var bar = 'this is bar';\n\n  function logFoo () {\n    console.log( foo );\n  }\n\n  function logBar () {\n    console.log( bar );\n  }\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/28.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar foo = () => undefined;\n\n\tassert.strictEqual( undefined, undefined );\n\n\tvar ctx = {};\n\tvar arrow = (x => assert.strictEqual( undefined, undefined ));\n\tvar fn = function () { assert.strictEqual( this, ctx ); };\n\n\tarrow.call(ctx);\n\tfn.call(ctx);\n\n\tassert.strictEqual(foo(), undefined);\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/30.js",
    "content": "define(['foo'], function (foo) {\n\n\t'use strict';\n\n\tfoo.bar();\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/31.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction someOtherName () {}\n\n\tfunction x () {}\n\n\tsomeOtherName();\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/32.js",
    "content": "define(function () {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/33.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar _Promise__Promise = function () {};\n\n\t_Promise__Promise.prototype = {\n\t\tkeep () { this.state = 'kept'; },\n\t\tbreak () { this.state = 'broken'; }\n\t};\n\n\tvar _Promise = _Promise__Promise;\n\n\tvar _Math = {\n\t\tget add () { return add; },\n\t\tget multiply () { return multiply; }\n\t};\n\n\tfunction add ( a, b ) {\n\t\treturn a + b;\n\t}\n\n\tfunction multiply ( a, b ) {\n\t\treturn a * b;\n\t}\n\n\tvar num = Math.max( 1, 2, 3 );\n\tvar resolved = Promise.resolve( num );\n\n\tfunction foo () {\n\t\treturn resolved;\n\t}\n\n\tvar promise = new _Promise();\n\tpromise.keep();\n\n\tconsole.log( _Math.add( 40, 2 ) );\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/34.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar foo__exports = {};\n\tfoo__exports.bar = function () {\n\t\tconsole.log( 'exports should be renamed' );\n\t};\n\n\tvar foo = foo__exports;\n\n\tfoo.bar();\n\n\tvar main = 'whatever';\n\n\treturn main;\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/35.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction a () {\n\t\tconsole.log( 'I am module a' );\n\t}\n\n\tfunction c () {\n\t\tconsole.log( 'I am module c' );\n\t}\n\n\tfunction b () {\n\t\tconsole.log( 'I am module b' );\n\t\tc();\n\t}\n\n\tfunction external () {\n\t\tconsole.log( 'I am an external dependency' );\n\t\ta();\n\t\tb();\n\t}\n\n\texternal();\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/36.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction dependsOnExternal () {\n\t\tconsole.log( external.message );\n\t}\n\n\tfunction external () {\n\t\tdependsOnExternal();\n\t}\n\n\texternal.message = 'don\\'t try this at home';\n\n\texternal();\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/37.js",
    "content": "define(['moment'], function (x) {\n\n\t'use strict';\n\n\tvar a__x = 'wut';\n\tvar a = a__x;\n\n\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/38.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar _foo = notActuallyFoo;\n\n\tfunction notActuallyFoo () {\n\t\tfoo();\n\t}\n\n\tfunction foo () {\n\t\tconsole.log( 'actually foo' );\n\t}\n\n\t_foo();\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/40.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/42.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/43.js",
    "content": "define(['bar'], function (Bar) {\n\n\t'use strict';\n\n\tclass Foo extends Bar {\n\t\tconstructor() {\n\t\t\tsuper();\n\t\t\tconsole.log('Foo constructed');\n\t\t}\n\t}\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/44.js",
    "content": "define(['foo', 'bar'], function (foo, _bar) {\n\n\t'use strict';\n\n\n\n\t(function () {\n\t\tvar bar = 'nope';\n\t\t_bar();\n\t})();\n\n\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/45.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar bar = 42;\n\n\tfunction foo () {\n\t\tconsole.log( bar );\n\t}\n\n\tfoo();\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/46.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar bar = 42;\n\n\tfunction foo () {\n\t\tconsole.log( bar );\n\t}\n\n\tfoo();\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/47.js",
    "content": "define(function () {\n\n\timplicitGlobal = 'lol';\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/48.js",
    "content": "define(['external'], function (external) {\n\n\t'use strict';\n\n\texternal();\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/49.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n});\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,xyz"
  },
  {
    "path": "test/bundle/output/amdDefaults/50.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tclass A {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating A' );\n\t\t}\n\n\t\tb () {\n\t\t\treturn new B();\n\t\t}\n\t}\n\n\tclass B extends A {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating B' );\n\t\t}\n\t}\n\n\tclass D {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating D' );\n\t\t}\n\n\t\tc () {\n\t\t\treturn new C();\n\t\t}\n\t}\n\n\tclass C extends D {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating C' );\n\t\t}\n\t}\n\n\tnew A().b();\n\tnew B();\n\tnew C();\n\tnew D().c();\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/51.js",
    "content": "define(['highlight.js'], function (highlight) {\n\n\t'use strict';\n\n\tvar foo = 42;\n\n\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/52.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar not_baz = function () {\n\t\t// baz.js\n\t};\n\n\n\n\t// bar.js\n\tconsole.log( 'baz', not_baz );\n\n\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/53.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar foo = function () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n\tvar main = function () {\n\t\tconsole.log( 'main' );\n\t}\n\n\treturn main;\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/54.js",
    "content": "define(['bluebird'], function (bluebird) {\n\n\t'use strict';\n\n\tvar foo = 'foo';\n\n\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/55.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tclass A {\n\t\tb () {\n\t\t\treturn new B();\n\t\t}\n\n\t\tc () {\n\t\t\treturn new C();\n\t\t}\n\t}\n\n\tclass B extends A {}\n\n\tclass C extends A {}\n\n\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/56.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar foo = 42;\n\tvar _foo = foo;\n\tfoo = 99;\n\tfoo += 1;\n\tfoo++;\n\n\tconsole.log( _foo ); // 42\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/57.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar foo = {\n\t\tget y () { return x; }\n\t};\n\n\tvar x = 42;\n\n\tconsole.log( foo.y );\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/59.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar foo = 'foo';\n\n\tconsole.log( foo ); // 'foo'\n\n});"
  },
  {
    "path": "test/bundle/output/amdDefaults/60.js",
    "content": "define(function () {\r\n\r\n\t'use strict';\r\n\r\n\tvar foo = 'foo';\r\n\r\n\tvar bar = 'bar';\r\n\r\n\t// Preserve comments after imports\r\n\r\n\tconsole.log( foo );\r\n\r\n});"
  },
  {
    "path": "test/bundle/output/cjs/01.js",
    "content": "'use strict';\n\nvar message = 'yes';\nvar foo = message;\n\nconsole.log( foo );"
  },
  {
    "path": "test/bundle/output/cjs/02.js",
    "content": "'use strict';\n\nvar message = 'yes';\nvar foo = message;\n\nconsole.log( foo );"
  },
  {
    "path": "test/bundle/output/cjs/03.js",
    "content": "'use strict';\n\nvar external = require('external');\nexternal = ('default' in external ? external['default'] : external);\n\nvar bar = 'yes';\nvar foo = bar;\n\nconsole.log( external( foo ) );"
  },
  {
    "path": "test/bundle/output/cjs/04.js",
    "content": "'use strict';\n\nvar answer = 42;\n\nvar main = answer * 2;\n\nexports['default'] = main;"
  },
  {
    "path": "test/bundle/output/cjs/05.js",
    "content": "'use strict';\n\nvar one = 1;\nvar two = 2;\nvar three = 3;\n\nvar four = one + 3;\nvar five = two + 3;\nvar six = three + 3;\n\nfour = 99;\n\nexports.four = four;\nexports.five = five;\nexports.six = six;"
  },
  {
    "path": "test/bundle/output/cjs/06.js",
    "content": "'use strict';\n\nvar external = require('utils/external');\nexternal = ('default' in external ? external['default'] : external);\n\nvar message = 'this is a message';\n\nconsole.log( message );"
  },
  {
    "path": "test/bundle/output/cjs/07.js",
    "content": "'use strict';\n\nvar foo = 'this is foo';\n\nfunction logFoo () {\n\tconsole.log( foo );\n}\n\nfunction logBar () {\n\tconsole.log( bar );\n}"
  },
  {
    "path": "test/bundle/output/cjs/08.js",
    "content": "'use strict';\n\nvar ImplicitlyNamed = require('external');\nImplicitlyNamed = ('default' in ImplicitlyNamed ? ImplicitlyNamed['default'] : ImplicitlyNamed);"
  },
  {
    "path": "test/bundle/output/cjs/09.js",
    "content": "'use strict';\n\nvar Correct = require('external');\nCorrect = ('default' in Correct ? Correct['default'] : Correct);"
  },
  {
    "path": "test/bundle/output/cjs/10.js",
    "content": "'use strict';\n\nclass Foo {\n\tconstructor( str ) {\n\t\tthis.str = str;\n\t}\n\n\ttoString() {\n\t\treturn this.str;\n\t}\n}\n\nexports['default'] = Foo;"
  },
  {
    "path": "test/bundle/output/cjs/11.js",
    "content": "'use strict';\n\nvar foo = 1;\nvar bar = 2;\n\nfoo = 3;\n\nexports.foo = foo;\nexports.bar = bar;\n\nvar baz = 4;\n\nexports.baz = baz;\n\nvar qux = 5;\nqux = 6;\n\nexports.qux = qux;"
  },
  {
    "path": "test/bundle/output/cjs/14.js",
    "content": "'use strict';\n\nvar foo = require('external');\nfoo = ('default' in foo ? foo['default'] : foo);\n\nfoo();"
  },
  {
    "path": "test/bundle/output/cjs/15.js",
    "content": "'use strict';\n\nvar external = require('external');\n\nexternal.foo();"
  },
  {
    "path": "test/bundle/output/cjs/16.js",
    "content": "'use strict';\n\nfunction _a__a () {\n\tconsole.log( 'a' );\n}\n\nfunction c__a () {\n\tconsole.log( 'a but actually c' );\n}\n\nvar b = function () {\n\t// a but actually c\n\tc__a();\n}\n\nfunction foo () {\n\t_a__a();\n}"
  },
  {
    "path": "test/bundle/output/cjs/17.js",
    "content": "'use strict';\n\nfunction foo__a ( message ) {\n\tconsole.log( message );\n}\n\nfoo__a();\n(function () {\n\tvar a = 'c';\n\tfoo__a( a );\n}());"
  },
  {
    "path": "test/bundle/output/cjs/18.js",
    "content": "'use strict';\n\nvar _doThing = function () {\n\tconsole.log( 'doing foo thing' );\n}\n\nvar foo = function () {\n\t_doThing();\n}\n\nvar bar = function () {\n\tdoThing();\n}\n\nvar doThing = function ( item ) {\n\tconsole.log( 'doing bar thing' );\n}\n\n"
  },
  {
    "path": "test/bundle/output/cjs/19.js",
    "content": "'use strict';\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nconsole.log( hasOwnProperty.call({ foo: 'bar' }, 'foo' ) );"
  },
  {
    "path": "test/bundle/output/cjs/20.js",
    "content": "'use strict';\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar main = function () {\n\tconsole.log( hasOwnProperty.call({ foo: 'bar' }, 'foo' ) );\n}\n\nexports['default'] = main;"
  },
  {
    "path": "test/bundle/output/cjs/21.js",
    "content": "'use strict';\n\nconst config = {};\n\nconfig.async = true;"
  },
  {
    "path": "test/bundle/output/cjs/22.js",
    "content": "'use strict';\n\nfunction foo () {\n\tconsole.log( 'fooing' );\n}\n\nexports.foo = foo;\n\n// foo\nfoo();"
  },
  {
    "path": "test/bundle/output/cjs/24.js",
    "content": "/* this is a banner */\n'use strict';\n\nfunction foo () {\n\tconsole.log( 'fooing' );\n}\n\nfunction bar () {\n\tconsole.log( 'baring' );\n}\n\nfoo();\nbar();\n/* this is a footer */"
  },
  {
    "path": "test/bundle/output/cjs/25.js",
    "content": "'use strict';\n\nvar foo = function () {\n\tconsole.log( 'fooing' );\n}\n\nfoo();"
  },
  {
    "path": "test/bundle/output/cjs/26.js",
    "content": "'use strict';\n\nfunction bar () {\n\tconsole.log( 'baring' );\n}\n\nbar();"
  },
  {
    "path": "test/bundle/output/cjs/27.js",
    "content": "'use strict';\n\nvar foo = 'this is foo';\n\nvar bar = 'this is bar';\n\nfunction logFoo () {\n  console.log( foo );\n}\n\nfunction logBar () {\n  console.log( bar );\n}"
  },
  {
    "path": "test/bundle/output/cjs/28.js",
    "content": "'use strict';\n\nvar foo = () => undefined;\n\nassert.strictEqual( undefined, undefined );\n\nvar ctx = {};\nvar arrow = (x => assert.strictEqual( undefined, undefined ));\nvar fn = function () { assert.strictEqual( this, ctx ); };\n\narrow.call(ctx);\nfn.call(ctx);\n\nassert.strictEqual(foo(), undefined);"
  },
  {
    "path": "test/bundle/output/cjs/29.js",
    "content": "'use strict';\n\nvar foo = require('foo');\nvar foo__default = ('default' in foo ? foo['default'] : foo);\n\nfoo__default();\nfoo.bar();"
  },
  {
    "path": "test/bundle/output/cjs/30.js",
    "content": "'use strict';\n\nvar foo = require('foo');\n\nfoo.bar();"
  },
  {
    "path": "test/bundle/output/cjs/31.js",
    "content": "'use strict';\n\nfunction someOtherName () {}\n\nfunction x () {}\n\nsomeOtherName();"
  },
  {
    "path": "test/bundle/output/cjs/32.js",
    "content": "'use strict';"
  },
  {
    "path": "test/bundle/output/cjs/33.js",
    "content": "'use strict';\n\nvar _Promise__Promise = function () {};\n\n_Promise__Promise.prototype = {\n\tkeep () { this.state = 'kept'; },\n\tbreak () { this.state = 'broken'; }\n};\n\nvar _Promise = _Promise__Promise;\n\nvar _Math = {\n\tget add () { return add; },\n\tget multiply () { return multiply; }\n};\n\nfunction add ( a, b ) {\n\treturn a + b;\n}\n\nfunction multiply ( a, b ) {\n\treturn a * b;\n}\n\nvar num = Math.max( 1, 2, 3 );\nvar resolved = Promise.resolve( num );\n\nfunction foo () {\n\treturn resolved;\n}\n\nvar promise = new _Promise();\npromise.keep();\n\nconsole.log( _Math.add( 40, 2 ) );"
  },
  {
    "path": "test/bundle/output/cjs/34.js",
    "content": "'use strict';\n\nvar foo__exports = {};\nfoo__exports.bar = function () {\n\tconsole.log( 'exports should be renamed' );\n};\n\nvar foo = foo__exports;\n\nfoo.bar();\n\nvar main = 'whatever';\n\nexports['default'] = main;"
  },
  {
    "path": "test/bundle/output/cjs/35.js",
    "content": "'use strict';\n\nfunction a () {\n\tconsole.log( 'I am module a' );\n}\n\nfunction c () {\n\tconsole.log( 'I am module c' );\n}\n\nfunction b () {\n\tconsole.log( 'I am module b' );\n\tc();\n}\n\nfunction external () {\n\tconsole.log( 'I am an external dependency' );\n\ta();\n\tb();\n}\n\nexternal();"
  },
  {
    "path": "test/bundle/output/cjs/36.js",
    "content": "'use strict';\n\nfunction dependsOnExternal () {\n\tconsole.log( external.message );\n}\n\nfunction external () {\n\tdependsOnExternal();\n}\n\nexternal.message = 'don\\'t try this at home';\n\nexternal();"
  },
  {
    "path": "test/bundle/output/cjs/37.js",
    "content": "'use strict';\n\nvar x = require('moment');\nx = ('default' in x ? x['default'] : x);\n\nvar a__x = 'wut';\nvar a = a__x;\n\n"
  },
  {
    "path": "test/bundle/output/cjs/38.js",
    "content": "'use strict';\n\nvar _foo = notActuallyFoo;\n\nfunction notActuallyFoo () {\n\tfoo();\n}\n\nfunction foo () {\n\tconsole.log( 'actually foo' );\n}\n\n_foo();"
  },
  {
    "path": "test/bundle/output/cjs/40.js",
    "content": "'use strict';\n\nfunction foo () {\n\tconsole.log( 'foo' );\n}\n\nfoo();"
  },
  {
    "path": "test/bundle/output/cjs/42.js",
    "content": "'use strict';\n\nfunction foo () {\n\tconsole.log( 'foo' );\n}\n\nfoo();"
  },
  {
    "path": "test/bundle/output/cjs/43.js",
    "content": "'use strict';\n\nvar Bar = require('bar');\nBar = ('default' in Bar ? Bar['default'] : Bar);\n\nclass Foo extends Bar {\n\tconstructor() {\n\t\tsuper();\n\t\tconsole.log('Foo constructed');\n\t}\n}"
  },
  {
    "path": "test/bundle/output/cjs/44.js",
    "content": "'use strict';\n\nvar foo = require('foo');\nfoo = ('default' in foo ? foo['default'] : foo);\nvar _bar = require('bar');\n_bar = ('default' in _bar ? _bar['default'] : _bar);\n\n\n\n(function () {\n\tvar bar = 'nope';\n\t_bar();\n})();\n\n"
  },
  {
    "path": "test/bundle/output/cjs/45.js",
    "content": "'use strict';\n\nvar bar = 42;\n\nfunction foo () {\n\tconsole.log( bar );\n}\n\nfoo();"
  },
  {
    "path": "test/bundle/output/cjs/46.js",
    "content": "'use strict';\n\nvar bar = 42;\n\nfunction foo () {\n\tconsole.log( bar );\n}\n\nfoo();"
  },
  {
    "path": "test/bundle/output/cjs/47.js",
    "content": "implicitGlobal = 'lol';"
  },
  {
    "path": "test/bundle/output/cjs/48.js",
    "content": "'use strict';\n\nvar external = require('external');\nexternal = ('default' in external ? external['default'] : external);\n\nexternal();"
  },
  {
    "path": "test/bundle/output/cjs/49.js",
    "content": "'use strict';\n\nfunction foo () {\n\tconsole.log( 'foo' );\n}\n\nfoo();\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,xyz"
  },
  {
    "path": "test/bundle/output/cjs/50.js",
    "content": "'use strict';\n\nclass A {\n\tconstructor () {\n\t\tconsole.log( 'creating A' );\n\t}\n\n\tb () {\n\t\treturn new B();\n\t}\n}\n\nclass B extends A {\n\tconstructor () {\n\t\tconsole.log( 'creating B' );\n\t}\n}\n\nclass D {\n\tconstructor () {\n\t\tconsole.log( 'creating D' );\n\t}\n\n\tc () {\n\t\treturn new C();\n\t}\n}\n\nclass C extends D {\n\tconstructor () {\n\t\tconsole.log( 'creating C' );\n\t}\n}\n\nnew A().b();\nnew B();\nnew C();\nnew D().c();"
  },
  {
    "path": "test/bundle/output/cjs/51.js",
    "content": "'use strict';\n\nvar highlight = require('highlight.js');\nhighlight = ('default' in highlight ? highlight['default'] : highlight);\n\nvar foo = 42;\n\n"
  },
  {
    "path": "test/bundle/output/cjs/52.js",
    "content": "'use strict';\n\nvar not_baz = function () {\n\t// baz.js\n};\n\n\n\n// bar.js\nconsole.log( 'baz', not_baz );\n\n"
  },
  {
    "path": "test/bundle/output/cjs/53.js",
    "content": "'use strict';\n\nvar foo = function () {\n\tconsole.log( 'foo' );\n}\n\nfoo();\n\nvar main = function () {\n\tconsole.log( 'main' );\n}\n\nexports['default'] = main;"
  },
  {
    "path": "test/bundle/output/cjs/54.js",
    "content": "'use strict';\n\nvar bluebird = require('bluebird');\nbluebird = ('default' in bluebird ? bluebird['default'] : bluebird);\n\nvar foo = 'foo';\n\n"
  },
  {
    "path": "test/bundle/output/cjs/55.js",
    "content": "'use strict';\n\nclass A {\n\tb () {\n\t\treturn new B();\n\t}\n\n\tc () {\n\t\treturn new C();\n\t}\n}\n\nclass B extends A {}\n\nclass C extends A {}\n\n"
  },
  {
    "path": "test/bundle/output/cjs/56.js",
    "content": "'use strict';\n\nvar foo = 42;\nvar _foo = foo;\nfoo = 99;\nfoo += 1;\nfoo++;\n\nconsole.log( _foo ); // 42"
  },
  {
    "path": "test/bundle/output/cjs/57.js",
    "content": "'use strict';\n\nvar foo = {\n\tget y () { return x; }\n};\n\nvar x = 42;\n\nconsole.log( foo.y );"
  },
  {
    "path": "test/bundle/output/cjs/58.js",
    "content": "'use strict';\n\nvar x = 42;\n\nexports.y = x;"
  },
  {
    "path": "test/bundle/output/cjs/59.js",
    "content": "'use strict';\n\nvar foo = 'foo';\n\nconsole.log( foo ); // 'foo'"
  },
  {
    "path": "test/bundle/output/cjs/60.js",
    "content": "'use strict';\r\n\r\nvar foo = 'foo';\r\n\r\nvar bar = 'bar';\r\n\r\n// Preserve comments after imports\r\n\r\nconsole.log( foo );"
  },
  {
    "path": "test/bundle/output/cjsDefaults/01.js",
    "content": "'use strict';\n\nvar message = 'yes';\nvar foo = message;\n\nconsole.log( foo );"
  },
  {
    "path": "test/bundle/output/cjsDefaults/02.js",
    "content": "'use strict';\n\nvar message = 'yes';\nvar foo = message;\n\nconsole.log( foo );"
  },
  {
    "path": "test/bundle/output/cjsDefaults/03.js",
    "content": "'use strict';\n\nvar external = require('external');\n\nvar bar = 'yes';\nvar foo = bar;\n\nconsole.log( external( foo ) );"
  },
  {
    "path": "test/bundle/output/cjsDefaults/04.js",
    "content": "'use strict';\n\nvar answer = 42;\n\nvar main = answer * 2;\n\nmodule.exports = main;"
  },
  {
    "path": "test/bundle/output/cjsDefaults/06.js",
    "content": "'use strict';\n\nvar external = require('utils/external');\n\nvar message = 'this is a message';\n\nconsole.log( message );"
  },
  {
    "path": "test/bundle/output/cjsDefaults/07.js",
    "content": "'use strict';\n\nvar foo = 'this is foo';\n\nfunction logFoo () {\n\tconsole.log( foo );\n}\n\nfunction logBar () {\n\tconsole.log( bar );\n}"
  },
  {
    "path": "test/bundle/output/cjsDefaults/08.js",
    "content": "'use strict';\n\nvar ImplicitlyNamed = require('external');"
  },
  {
    "path": "test/bundle/output/cjsDefaults/09.js",
    "content": "'use strict';\n\nvar Correct = require('external');"
  },
  {
    "path": "test/bundle/output/cjsDefaults/10.js",
    "content": "'use strict';\n\nclass Foo {\n\tconstructor( str ) {\n\t\tthis.str = str;\n\t}\n\n\ttoString() {\n\t\treturn this.str;\n\t}\n}\n\nmodule.exports = Foo;"
  },
  {
    "path": "test/bundle/output/cjsDefaults/14.js",
    "content": "'use strict';\n\nvar foo = require('external');\n\nfoo();"
  },
  {
    "path": "test/bundle/output/cjsDefaults/16.js",
    "content": "'use strict';\n\nfunction _a__a () {\n\tconsole.log( 'a' );\n}\n\nfunction c__a () {\n\tconsole.log( 'a but actually c' );\n}\n\nvar b = function () {\n\t// a but actually c\n\tc__a();\n}\n\nfunction foo () {\n\t_a__a();\n}"
  },
  {
    "path": "test/bundle/output/cjsDefaults/17.js",
    "content": "'use strict';\n\nfunction foo__a ( message ) {\n\tconsole.log( message );\n}\n\nfoo__a();\n(function () {\n\tvar a = 'c';\n\tfoo__a( a );\n}());"
  },
  {
    "path": "test/bundle/output/cjsDefaults/18.js",
    "content": "'use strict';\n\nvar _doThing = function () {\n\tconsole.log( 'doing foo thing' );\n}\n\nvar foo = function () {\n\t_doThing();\n}\n\nvar bar = function () {\n\tdoThing();\n}\n\nvar doThing = function ( item ) {\n\tconsole.log( 'doing bar thing' );\n}\n\n"
  },
  {
    "path": "test/bundle/output/cjsDefaults/19.js",
    "content": "'use strict';\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nconsole.log( hasOwnProperty.call({ foo: 'bar' }, 'foo' ) );"
  },
  {
    "path": "test/bundle/output/cjsDefaults/20.js",
    "content": "'use strict';\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar main = function () {\n\tconsole.log( hasOwnProperty.call({ foo: 'bar' }, 'foo' ) );\n}\n\nmodule.exports = main;"
  },
  {
    "path": "test/bundle/output/cjsDefaults/21.js",
    "content": "'use strict';\n\nconst config = {};\n\nconfig.async = true;"
  },
  {
    "path": "test/bundle/output/cjsDefaults/24.js",
    "content": "/* this is a banner */\n'use strict';\n\nfunction foo () {\n\tconsole.log( 'fooing' );\n}\n\nfunction bar () {\n\tconsole.log( 'baring' );\n}\n\nfoo();\nbar();\n/* this is a footer */"
  },
  {
    "path": "test/bundle/output/cjsDefaults/25.js",
    "content": "'use strict';\n\nvar foo = function () {\n\tconsole.log( 'fooing' );\n}\n\nfoo();"
  },
  {
    "path": "test/bundle/output/cjsDefaults/26.js",
    "content": "'use strict';\n\nfunction bar () {\n\tconsole.log( 'baring' );\n}\n\nbar();"
  },
  {
    "path": "test/bundle/output/cjsDefaults/27.js",
    "content": "'use strict';\n\nvar foo = 'this is foo';\n\nvar bar = 'this is bar';\n\nfunction logFoo () {\n  console.log( foo );\n}\n\nfunction logBar () {\n  console.log( bar );\n}"
  },
  {
    "path": "test/bundle/output/cjsDefaults/28.js",
    "content": "'use strict';\n\nvar foo = () => undefined;\n\nassert.strictEqual( undefined, undefined );\n\nvar ctx = {};\nvar arrow = (x => assert.strictEqual( undefined, undefined ));\nvar fn = function () { assert.strictEqual( this, ctx ); };\n\narrow.call(ctx);\nfn.call(ctx);\n\nassert.strictEqual(foo(), undefined);"
  },
  {
    "path": "test/bundle/output/cjsDefaults/30.js",
    "content": "'use strict';\n\nvar foo = require('foo');\n\nfoo.bar();"
  },
  {
    "path": "test/bundle/output/cjsDefaults/31.js",
    "content": "'use strict';\n\nfunction someOtherName () {}\n\nfunction x () {}\n\nsomeOtherName();"
  },
  {
    "path": "test/bundle/output/cjsDefaults/32.js",
    "content": "'use strict';"
  },
  {
    "path": "test/bundle/output/cjsDefaults/33.js",
    "content": "'use strict';\n\nvar _Promise__Promise = function () {};\n\n_Promise__Promise.prototype = {\n\tkeep () { this.state = 'kept'; },\n\tbreak () { this.state = 'broken'; }\n};\n\nvar _Promise = _Promise__Promise;\n\nvar _Math = {\n\tget add () { return add; },\n\tget multiply () { return multiply; }\n};\n\nfunction add ( a, b ) {\n\treturn a + b;\n}\n\nfunction multiply ( a, b ) {\n\treturn a * b;\n}\n\nvar num = Math.max( 1, 2, 3 );\nvar resolved = Promise.resolve( num );\n\nfunction foo () {\n\treturn resolved;\n}\n\nvar promise = new _Promise();\npromise.keep();\n\nconsole.log( _Math.add( 40, 2 ) );"
  },
  {
    "path": "test/bundle/output/cjsDefaults/34.js",
    "content": "'use strict';\n\nvar foo__exports = {};\nfoo__exports.bar = function () {\n\tconsole.log( 'exports should be renamed' );\n};\n\nvar foo = foo__exports;\n\nfoo.bar();\n\nvar main = 'whatever';\n\nmodule.exports = main;"
  },
  {
    "path": "test/bundle/output/cjsDefaults/35.js",
    "content": "'use strict';\n\nfunction a () {\n\tconsole.log( 'I am module a' );\n}\n\nfunction c () {\n\tconsole.log( 'I am module c' );\n}\n\nfunction b () {\n\tconsole.log( 'I am module b' );\n\tc();\n}\n\nfunction external () {\n\tconsole.log( 'I am an external dependency' );\n\ta();\n\tb();\n}\n\nexternal();"
  },
  {
    "path": "test/bundle/output/cjsDefaults/36.js",
    "content": "'use strict';\n\nfunction dependsOnExternal () {\n\tconsole.log( external.message );\n}\n\nfunction external () {\n\tdependsOnExternal();\n}\n\nexternal.message = 'don\\'t try this at home';\n\nexternal();"
  },
  {
    "path": "test/bundle/output/cjsDefaults/37.js",
    "content": "'use strict';\n\nvar x = require('moment');\n\nvar a__x = 'wut';\nvar a = a__x;\n\n"
  },
  {
    "path": "test/bundle/output/cjsDefaults/38.js",
    "content": "'use strict';\n\nvar _foo = notActuallyFoo;\n\nfunction notActuallyFoo () {\n\tfoo();\n}\n\nfunction foo () {\n\tconsole.log( 'actually foo' );\n}\n\n_foo();"
  },
  {
    "path": "test/bundle/output/cjsDefaults/40.js",
    "content": "'use strict';\n\nfunction foo () {\n\tconsole.log( 'foo' );\n}\n\nfoo();"
  },
  {
    "path": "test/bundle/output/cjsDefaults/42.js",
    "content": "'use strict';\n\nfunction foo () {\n\tconsole.log( 'foo' );\n}\n\nfoo();"
  },
  {
    "path": "test/bundle/output/cjsDefaults/43.js",
    "content": "'use strict';\n\nvar Bar = require('bar');\n\nclass Foo extends Bar {\n\tconstructor() {\n\t\tsuper();\n\t\tconsole.log('Foo constructed');\n\t}\n}"
  },
  {
    "path": "test/bundle/output/cjsDefaults/44.js",
    "content": "'use strict';\n\nvar foo = require('foo');\nvar _bar = require('bar');\n\n\n\n(function () {\n\tvar bar = 'nope';\n\t_bar();\n})();\n\n"
  },
  {
    "path": "test/bundle/output/cjsDefaults/45.js",
    "content": "'use strict';\n\nvar bar = 42;\n\nfunction foo () {\n\tconsole.log( bar );\n}\n\nfoo();"
  },
  {
    "path": "test/bundle/output/cjsDefaults/46.js",
    "content": "'use strict';\n\nvar bar = 42;\n\nfunction foo () {\n\tconsole.log( bar );\n}\n\nfoo();"
  },
  {
    "path": "test/bundle/output/cjsDefaults/47.js",
    "content": "implicitGlobal = 'lol';"
  },
  {
    "path": "test/bundle/output/cjsDefaults/48.js",
    "content": "'use strict';\n\nvar external = require('external');\n\nexternal();"
  },
  {
    "path": "test/bundle/output/cjsDefaults/49.js",
    "content": "'use strict';\n\nfunction foo () {\n\tconsole.log( 'foo' );\n}\n\nfoo();\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,xyz"
  },
  {
    "path": "test/bundle/output/cjsDefaults/50.js",
    "content": "'use strict';\n\nclass A {\n\tconstructor () {\n\t\tconsole.log( 'creating A' );\n\t}\n\n\tb () {\n\t\treturn new B();\n\t}\n}\n\nclass B extends A {\n\tconstructor () {\n\t\tconsole.log( 'creating B' );\n\t}\n}\n\nclass D {\n\tconstructor () {\n\t\tconsole.log( 'creating D' );\n\t}\n\n\tc () {\n\t\treturn new C();\n\t}\n}\n\nclass C extends D {\n\tconstructor () {\n\t\tconsole.log( 'creating C' );\n\t}\n}\n\nnew A().b();\nnew B();\nnew C();\nnew D().c();"
  },
  {
    "path": "test/bundle/output/cjsDefaults/51.js",
    "content": "'use strict';\n\nvar highlight = require('highlight.js');\n\nvar foo = 42;\n\n"
  },
  {
    "path": "test/bundle/output/cjsDefaults/52.js",
    "content": "'use strict';\n\nvar not_baz = function () {\n\t// baz.js\n};\n\n\n\n// bar.js\nconsole.log( 'baz', not_baz );\n\n"
  },
  {
    "path": "test/bundle/output/cjsDefaults/53.js",
    "content": "'use strict';\n\nvar foo = function () {\n\tconsole.log( 'foo' );\n}\n\nfoo();\n\nvar main = function () {\n\tconsole.log( 'main' );\n}\n\nmodule.exports = main;"
  },
  {
    "path": "test/bundle/output/cjsDefaults/54.js",
    "content": "'use strict';\n\nvar bluebird = require('bluebird');\n\nvar foo = 'foo';\n\n"
  },
  {
    "path": "test/bundle/output/cjsDefaults/55.js",
    "content": "'use strict';\n\nclass A {\n\tb () {\n\t\treturn new B();\n\t}\n\n\tc () {\n\t\treturn new C();\n\t}\n}\n\nclass B extends A {}\n\nclass C extends A {}\n\n"
  },
  {
    "path": "test/bundle/output/cjsDefaults/56.js",
    "content": "'use strict';\n\nvar foo = 42;\nvar _foo = foo;\nfoo = 99;\nfoo += 1;\nfoo++;\n\nconsole.log( _foo ); // 42"
  },
  {
    "path": "test/bundle/output/cjsDefaults/57.js",
    "content": "'use strict';\n\nvar foo = {\n\tget y () { return x; }\n};\n\nvar x = 42;\n\nconsole.log( foo.y );"
  },
  {
    "path": "test/bundle/output/cjsDefaults/59.js",
    "content": "'use strict';\n\nvar foo = 'foo';\n\nconsole.log( foo ); // 'foo'"
  },
  {
    "path": "test/bundle/output/cjsDefaults/60.js",
    "content": "'use strict';\r\n\r\nvar foo = 'foo';\r\n\r\nvar bar = 'bar';\r\n\r\n// Preserve comments after imports\r\n\r\nconsole.log( foo );"
  },
  {
    "path": "test/bundle/output/concat/01.js",
    "content": "(function () { 'use strict';\n\n\tvar message = 'yes';\n\tvar foo = message;\n\n\tconsole.log( foo );\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/02.js",
    "content": "(function () { 'use strict';\n\n\tvar message = 'yes';\n\tvar foo = message;\n\n\tconsole.log( foo );\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/07.js",
    "content": "(function () { 'use strict';\n\n\tvar foo = 'this is foo';\n\n\tfunction logFoo () {\n\t\tconsole.log( foo );\n\t}\n\n\tfunction logBar () {\n\t\tconsole.log( bar );\n\t}\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/16.js",
    "content": "(function () { 'use strict';\n\n\tfunction _a__a () {\n\t\tconsole.log( 'a' );\n\t}\n\n\tfunction c__a () {\n\t\tconsole.log( 'a but actually c' );\n\t}\n\n\tvar b = function () {\n\t\t// a but actually c\n\t\tc__a();\n\t}\n\n\tfunction foo () {\n\t\t_a__a();\n\t}\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/17.js",
    "content": "(function () { 'use strict';\n\n\tfunction foo__a ( message ) {\n\t\tconsole.log( message );\n\t}\n\n\tfoo__a();\n\t(function () {\n\t\tvar a = 'c';\n\t\tfoo__a( a );\n\t}());\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/18.js",
    "content": "(function () { 'use strict';\n\n\tvar _doThing = function () {\n\t\tconsole.log( 'doing foo thing' );\n\t}\n\n\tvar foo = function () {\n\t\t_doThing();\n\t}\n\n\tvar bar = function () {\n\t\tdoThing();\n\t}\n\n\tvar doThing = function ( item ) {\n\t\tconsole.log( 'doing bar thing' );\n\t}\n\n\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/19.js",
    "content": "(function () { 'use strict';\n\n\tvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\tconsole.log( hasOwnProperty.call({ foo: 'bar' }, 'foo' ) );\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/21.js",
    "content": "(function () { 'use strict';\n\n\tconst config = {};\n\n\tconfig.async = true;\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/24.js",
    "content": "/* this is a banner */\n(function () { 'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'fooing' );\n\t}\n\n\tfunction bar () {\n\t\tconsole.log( 'baring' );\n\t}\n\n\tfoo();\n\tbar();\n\n})();\n/* this is a footer */"
  },
  {
    "path": "test/bundle/output/concat/25.js",
    "content": "(function () { 'use strict';\n\n\tvar foo = function () {\n\t\tconsole.log( 'fooing' );\n\t}\n\n\tfoo();\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/26.js",
    "content": "(function () { 'use strict';\n\n\tfunction bar () {\n\t\tconsole.log( 'baring' );\n\t}\n\n\tbar();\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/27.js",
    "content": "(function () { 'use strict';\n\n  var foo = 'this is foo';\n\n  var bar = 'this is bar';\n\n  function logFoo () {\n    console.log( foo );\n  }\n\n  function logBar () {\n    console.log( bar );\n  }\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/28.js",
    "content": "(function () { 'use strict';\n\n\tvar foo = () => undefined;\n\n\tassert.strictEqual( undefined, undefined );\n\n\tvar ctx = {};\n\tvar arrow = (x => assert.strictEqual( undefined, undefined ));\n\tvar fn = function () { assert.strictEqual( this, ctx ); };\n\n\tarrow.call(ctx);\n\tfn.call(ctx);\n\n\tassert.strictEqual(foo(), undefined);\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/31.js",
    "content": "(function () { 'use strict';\n\n\tfunction someOtherName () {}\n\n\tfunction x () {}\n\n\tsomeOtherName();\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/32.js",
    "content": "(function () { 'use strict';\n\n\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/33.js",
    "content": "(function () { 'use strict';\n\n\tvar _Promise__Promise = function () {};\n\n\t_Promise__Promise.prototype = {\n\t\tkeep () { this.state = 'kept'; },\n\t\tbreak () { this.state = 'broken'; }\n\t};\n\n\tvar _Promise = _Promise__Promise;\n\n\tvar _Math = {\n\t\tget add () { return add; },\n\t\tget multiply () { return multiply; }\n\t};\n\n\tfunction add ( a, b ) {\n\t\treturn a + b;\n\t}\n\n\tfunction multiply ( a, b ) {\n\t\treturn a * b;\n\t}\n\n\tvar num = Math.max( 1, 2, 3 );\n\tvar resolved = Promise.resolve( num );\n\n\tfunction foo () {\n\t\treturn resolved;\n\t}\n\n\tvar promise = new _Promise();\n\tpromise.keep();\n\n\tconsole.log( _Math.add( 40, 2 ) );\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/35.js",
    "content": "(function () { 'use strict';\n\n\tfunction a () {\n\t\tconsole.log( 'I am module a' );\n\t}\n\n\tfunction c () {\n\t\tconsole.log( 'I am module c' );\n\t}\n\n\tfunction b () {\n\t\tconsole.log( 'I am module b' );\n\t\tc();\n\t}\n\n\tfunction external () {\n\t\tconsole.log( 'I am an external dependency' );\n\t\ta();\n\t\tb();\n\t}\n\n\texternal();\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/36.js",
    "content": "(function () { 'use strict';\n\n\tfunction dependsOnExternal () {\n\t\tconsole.log( external.message );\n\t}\n\n\tfunction external () {\n\t\tdependsOnExternal();\n\t}\n\n\texternal.message = 'don\\'t try this at home';\n\n\texternal();\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/38.js",
    "content": "(function () { 'use strict';\n\n\tvar _foo = notActuallyFoo;\n\n\tfunction notActuallyFoo () {\n\t\tfoo();\n\t}\n\n\tfunction foo () {\n\t\tconsole.log( 'actually foo' );\n\t}\n\n\t_foo();\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/40.js",
    "content": "(function () { 'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/42.js",
    "content": "(function () { 'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/45.js",
    "content": "(function () { 'use strict';\n\n\tvar bar = 42;\n\n\tfunction foo () {\n\t\tconsole.log( bar );\n\t}\n\n\tfoo();\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/46.js",
    "content": "(function () { 'use strict';\n\n\tvar bar = 42;\n\n\tfunction foo () {\n\t\tconsole.log( bar );\n\t}\n\n\tfoo();\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/47.js",
    "content": "(function () { 'use strict';\n\n\timplicitGlobal = 'lol';\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/49.js",
    "content": "(function () { 'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n})();\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,xyz"
  },
  {
    "path": "test/bundle/output/concat/50.js",
    "content": "(function () { 'use strict';\n\n\tclass A {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating A' );\n\t\t}\n\n\t\tb () {\n\t\t\treturn new B();\n\t\t}\n\t}\n\n\tclass B extends A {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating B' );\n\t\t}\n\t}\n\n\tclass D {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating D' );\n\t\t}\n\n\t\tc () {\n\t\t\treturn new C();\n\t\t}\n\t}\n\n\tclass C extends D {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating C' );\n\t\t}\n\t}\n\n\tnew A().b();\n\tnew B();\n\tnew C();\n\tnew D().c();\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/52.js",
    "content": "(function () { 'use strict';\n\n\tvar not_baz = function () {\n\t\t// baz.js\n\t};\n\n\n\n\t// bar.js\n\tconsole.log( 'baz', not_baz );\n\n\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/55.js",
    "content": "(function () { 'use strict';\n\n\tclass A {\n\t\tb () {\n\t\t\treturn new B();\n\t\t}\n\n\t\tc () {\n\t\t\treturn new C();\n\t\t}\n\t}\n\n\tclass B extends A {}\n\n\tclass C extends A {}\n\n\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/56.js",
    "content": "(function () { 'use strict';\n\n\tvar foo = 42;\n\tvar _foo = foo;\n\tfoo = 99;\n\tfoo += 1;\n\tfoo++;\n\n\tconsole.log( _foo ); // 42\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/57.js",
    "content": "(function () { 'use strict';\n\n\tvar foo = {\n\t\tget y () { return x; }\n\t};\n\n\tvar x = 42;\n\n\tconsole.log( foo.y );\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/59.js",
    "content": "(function () { 'use strict';\n\n\tvar foo = 'foo';\n\n\tconsole.log( foo ); // 'foo'\n\n})();"
  },
  {
    "path": "test/bundle/output/concat/60.js",
    "content": "(function () { 'use strict';\r\n\r\n\tvar foo = 'foo';\r\n\r\n\tvar bar = 'bar';\r\n\r\n\t// Preserve comments after imports\r\n\r\n\tconsole.log( foo );\r\n\r\n})();"
  },
  {
    "path": "test/bundle/output/umd/01.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar message = 'yes';\n\tvar foo = message;\n\n\tconsole.log( foo );\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/02.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar message = 'yes';\n\tvar foo = message;\n\n\tconsole.log( foo );\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/03.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('external')) :\n\ttypeof define === 'function' && define.amd ? define(['external'], factory) :\n\tfactory(global.external)\n}(this, function (external) { 'use strict';\n\n\texternal = ('default' in external ? external['default'] : external);\n\n\tvar bar = 'yes';\n\tvar foo = bar;\n\n\tconsole.log( external( foo ) );\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/04.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tvar answer = 42;\n\n\tvar main = answer * 2;\n\n\texports['default'] = main;\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/05.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tvar one = 1;\n\tvar two = 2;\n\tvar three = 3;\n\n\tvar four = one + 3;\n\tvar five = two + 3;\n\tvar six = three + 3;\n\n\tfour = 99;\n\n\texports.four = four;\n\texports.five = five;\n\texports.six = six;\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/06.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('utils/external')) :\n\ttypeof define === 'function' && define.amd ? define(['utils/external'], factory) :\n\tfactory(global.external)\n}(this, function (external) { 'use strict';\n\n\texternal = ('default' in external ? external['default'] : external);\n\n\tvar message = 'this is a message';\n\n\tconsole.log( message );\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/07.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar foo = 'this is foo';\n\n\tfunction logFoo () {\n\t\tconsole.log( foo );\n\t}\n\n\tfunction logBar () {\n\t\tconsole.log( bar );\n\t}\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/08.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('external')) :\n\ttypeof define === 'function' && define.amd ? define(['external'], factory) :\n\tfactory(global.ImplicitlyNamed)\n}(this, function (ImplicitlyNamed) { 'use strict';\n\n\tImplicitlyNamed = ('default' in ImplicitlyNamed ? ImplicitlyNamed['default'] : ImplicitlyNamed);\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/09.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('external')) :\n\ttypeof define === 'function' && define.amd ? define(['external'], factory) :\n\tfactory(global.Correct)\n}(this, function (Correct) { 'use strict';\n\n\tCorrect = ('default' in Correct ? Correct['default'] : Correct);\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/10.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tclass Foo {\n\t\tconstructor( str ) {\n\t\t\tthis.str = str;\n\t\t}\n\n\t\ttoString() {\n\t\t\treturn this.str;\n\t\t}\n\t}\n\n\texports['default'] = Foo;\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/11.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tvar foo = 1;\n\tvar bar = 2;\n\n\tfoo = 3;\n\n\texports.foo = foo;\n\texports.bar = bar;\n\n\tvar baz = 4;\n\n\texports.baz = baz;\n\n\tvar qux = 5;\n\tqux = 6;\n\n\texports.qux = qux;\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/14.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('external')) :\n\ttypeof define === 'function' && define.amd ? define(['external'], factory) :\n\tfactory(global.foo)\n}(this, function (foo) { 'use strict';\n\n\tfoo = ('default' in foo ? foo['default'] : foo);\n\n\tfoo();\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/15.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('external')) :\n\ttypeof define === 'function' && define.amd ? define(['external'], factory) :\n\tfactory(global.external)\n}(this, function (external) { 'use strict';\n\n\texternal.foo();\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/16.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction _a__a () {\n\t\tconsole.log( 'a' );\n\t}\n\n\tfunction c__a () {\n\t\tconsole.log( 'a but actually c' );\n\t}\n\n\tvar b = function () {\n\t\t// a but actually c\n\t\tc__a();\n\t}\n\n\tfunction foo () {\n\t\t_a__a();\n\t}\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/17.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction foo__a ( message ) {\n\t\tconsole.log( message );\n\t}\n\n\tfoo__a();\n\t(function () {\n\t\tvar a = 'c';\n\t\tfoo__a( a );\n\t}());\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/18.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar _doThing = function () {\n\t\tconsole.log( 'doing foo thing' );\n\t}\n\n\tvar foo = function () {\n\t\t_doThing();\n\t}\n\n\tvar bar = function () {\n\t\tdoThing();\n\t}\n\n\tvar doThing = function ( item ) {\n\t\tconsole.log( 'doing bar thing' );\n\t}\n\n\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/19.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\tconsole.log( hasOwnProperty.call({ foo: 'bar' }, 'foo' ) );\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/20.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\tvar main = function () {\n\t\tconsole.log( hasOwnProperty.call({ foo: 'bar' }, 'foo' ) );\n\t}\n\n\texports['default'] = main;\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/21.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tconst config = {};\n\n\tconfig.async = true;\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/22.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'fooing' );\n\t}\n\n\texports.foo = foo;\n\n\t// foo\n\tfoo();\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/24.js",
    "content": "/* this is a banner */\n(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'fooing' );\n\t}\n\n\tfunction bar () {\n\t\tconsole.log( 'baring' );\n\t}\n\n\tfoo();\n\tbar();\n\n}));\n/* this is a footer */"
  },
  {
    "path": "test/bundle/output/umd/25.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define('myModule', factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar foo = function () {\n\t\tconsole.log( 'fooing' );\n\t}\n\n\tfoo();\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/26.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction bar () {\n\t\tconsole.log( 'baring' );\n\t}\n\n\tbar();\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/27.js",
    "content": "(function (factory) {\n  !(typeof exports === 'object' && typeof module !== 'undefined') &&\n  typeof define === 'function' && define.amd ? define(factory) :\n  factory()\n}(function () { 'use strict';\n\n  var foo = 'this is foo';\n\n  var bar = 'this is bar';\n\n  function logFoo () {\n    console.log( foo );\n  }\n\n  function logBar () {\n    console.log( bar );\n  }\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/28.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar foo = () => undefined;\n\n\tassert.strictEqual( undefined, undefined );\n\n\tvar ctx = {};\n\tvar arrow = (x => assert.strictEqual( undefined, undefined ));\n\tvar fn = function () { assert.strictEqual( this, ctx ); };\n\n\tarrow.call(ctx);\n\tfn.call(ctx);\n\n\tassert.strictEqual(foo(), undefined);\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/29.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('foo')) :\n\ttypeof define === 'function' && define.amd ? define(['foo'], factory) :\n\tfactory(global.foo)\n}(this, function (foo) { 'use strict';\n\n\tvar foo__default = ('default' in foo ? foo['default'] : foo);\n\n\tfoo__default();\n\tfoo.bar();\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/30.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('foo')) :\n\ttypeof define === 'function' && define.amd ? define(['foo'], factory) :\n\tfactory(global.foo)\n}(this, function (foo) { 'use strict';\n\n\tfoo.bar();\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/31.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction someOtherName () {}\n\n\tfunction x () {}\n\n\tsomeOtherName();\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/32.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/33.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar _Promise__Promise = function () {};\n\n\t_Promise__Promise.prototype = {\n\t\tkeep () { this.state = 'kept'; },\n\t\tbreak () { this.state = 'broken'; }\n\t};\n\n\tvar _Promise = _Promise__Promise;\n\n\tvar _Math = {\n\t\tget add () { return add; },\n\t\tget multiply () { return multiply; }\n\t};\n\n\tfunction add ( a, b ) {\n\t\treturn a + b;\n\t}\n\n\tfunction multiply ( a, b ) {\n\t\treturn a * b;\n\t}\n\n\tvar num = Math.max( 1, 2, 3 );\n\tvar resolved = Promise.resolve( num );\n\n\tfunction foo () {\n\t\treturn resolved;\n\t}\n\n\tvar promise = new _Promise();\n\tpromise.keep();\n\n\tconsole.log( _Math.add( 40, 2 ) );\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/34.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tvar foo__exports = {};\n\tfoo__exports.bar = function () {\n\t\tconsole.log( 'exports should be renamed' );\n\t};\n\n\tvar foo = foo__exports;\n\n\tfoo.bar();\n\n\tvar main = 'whatever';\n\n\texports['default'] = main;\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/35.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction a () {\n\t\tconsole.log( 'I am module a' );\n\t}\n\n\tfunction c () {\n\t\tconsole.log( 'I am module c' );\n\t}\n\n\tfunction b () {\n\t\tconsole.log( 'I am module b' );\n\t\tc();\n\t}\n\n\tfunction external () {\n\t\tconsole.log( 'I am an external dependency' );\n\t\ta();\n\t\tb();\n\t}\n\n\texternal();\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/36.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction dependsOnExternal () {\n\t\tconsole.log( external.message );\n\t}\n\n\tfunction external () {\n\t\tdependsOnExternal();\n\t}\n\n\texternal.message = 'don\\'t try this at home';\n\n\texternal();\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/37.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('moment')) :\n\ttypeof define === 'function' && define.amd ? define(['moment'], factory) :\n\tfactory(global.x)\n}(this, function (x) { 'use strict';\n\n\tx = ('default' in x ? x['default'] : x);\n\n\tvar a__x = 'wut';\n\tvar a = a__x;\n\n\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/38.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar _foo = notActuallyFoo;\n\n\tfunction notActuallyFoo () {\n\t\tfoo();\n\t}\n\n\tfunction foo () {\n\t\tconsole.log( 'actually foo' );\n\t}\n\n\t_foo();\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/40.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/42.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/43.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('bar')) :\n\ttypeof define === 'function' && define.amd ? define(['bar'], factory) :\n\tfactory(global.Bar)\n}(this, function (Bar) { 'use strict';\n\n\tBar = ('default' in Bar ? Bar['default'] : Bar);\n\n\tclass Foo extends Bar {\n\t\tconstructor() {\n\t\t\tsuper();\n\t\t\tconsole.log('Foo constructed');\n\t\t}\n\t}\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/44.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('foo'), require('bar')) :\n\ttypeof define === 'function' && define.amd ? define(['foo', 'bar'], factory) :\n\tfactory(global.foo, global._bar)\n}(this, function (foo, _bar) { 'use strict';\n\n\tfoo = ('default' in foo ? foo['default'] : foo);\n\t_bar = ('default' in _bar ? _bar['default'] : _bar);\n\n\n\n\t(function () {\n\t\tvar bar = 'nope';\n\t\t_bar();\n\t})();\n\n\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/45.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar bar = 42;\n\n\tfunction foo () {\n\t\tconsole.log( bar );\n\t}\n\n\tfoo();\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/46.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar bar = 42;\n\n\tfunction foo () {\n\t\tconsole.log( bar );\n\t}\n\n\tfoo();\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/47.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () {\n\n\timplicitGlobal = 'lol';\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/48.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('external')) :\n\ttypeof define === 'function' && define.amd ? define(['external'], factory) :\n\tfactory(global.external)\n}(this, function (external) { 'use strict';\n\n\texternal = ('default' in external ? external['default'] : external);\n\n\texternal();\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/49.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n}));\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,xyz"
  },
  {
    "path": "test/bundle/output/umd/50.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tclass A {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating A' );\n\t\t}\n\n\t\tb () {\n\t\t\treturn new B();\n\t\t}\n\t}\n\n\tclass B extends A {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating B' );\n\t\t}\n\t}\n\n\tclass D {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating D' );\n\t\t}\n\n\t\tc () {\n\t\t\treturn new C();\n\t\t}\n\t}\n\n\tclass C extends D {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating C' );\n\t\t}\n\t}\n\n\tnew A().b();\n\tnew B();\n\tnew C();\n\tnew D().c();\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/51.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('highlight.js')) :\n\ttypeof define === 'function' && define.amd ? define(['highlight.js'], factory) :\n\tfactory(global.highlight)\n}(this, function (highlight) { 'use strict';\n\n\thighlight = ('default' in highlight ? highlight['default'] : highlight);\n\n\tvar foo = 42;\n\n\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/52.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar not_baz = function () {\n\t\t// baz.js\n\t};\n\n\n\n\t// bar.js\n\tconsole.log( 'baz', not_baz );\n\n\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/53.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tvar foo = function () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n\tvar main = function () {\n\t\tconsole.log( 'main' );\n\t}\n\n\texports['default'] = main;\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/54.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('bluebird')) :\n\ttypeof define === 'function' && define.amd ? define(['bluebird'], factory) :\n\tfactory(global.bluebird)\n}(this, function (bluebird) { 'use strict';\n\n\tbluebird = ('default' in bluebird ? bluebird['default'] : bluebird);\n\n\tvar foo = 'foo';\n\n\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/55.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tclass A {\n\t\tb () {\n\t\t\treturn new B();\n\t\t}\n\n\t\tc () {\n\t\t\treturn new C();\n\t\t}\n\t}\n\n\tclass B extends A {}\n\n\tclass C extends A {}\n\n\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/56.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar foo = 42;\n\tvar _foo = foo;\n\tfoo = 99;\n\tfoo += 1;\n\tfoo++;\n\n\tconsole.log( _foo ); // 42\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/57.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar foo = {\n\t\tget y () { return x; }\n\t};\n\n\tvar x = 42;\n\n\tconsole.log( foo.y );\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/58.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tvar x = 42;\n\n\texports.y = x;\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/59.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar foo = 'foo';\n\n\tconsole.log( foo ); // 'foo'\n\n}));"
  },
  {
    "path": "test/bundle/output/umd/60.js",
    "content": "(function (factory) {\r\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\r\n\ttypeof define === 'function' && define.amd ? define(factory) :\r\n\tfactory()\r\n}(function () { 'use strict';\r\n\r\n\tvar foo = 'foo';\r\n\r\n\tvar bar = 'bar';\r\n\r\n\t// Preserve comments after imports\r\n\r\n\tconsole.log( foo );\r\n\r\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/01.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar message = 'yes';\n\tvar foo = message;\n\n\tconsole.log( foo );\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/02.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar message = 'yes';\n\tvar foo = message;\n\n\tconsole.log( foo );\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/03.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('external')) :\n\ttypeof define === 'function' && define.amd ? define(['external'], factory) :\n\tfactory(global.external)\n}(this, function (external) { 'use strict';\n\n\tvar bar = 'yes';\n\tvar foo = bar;\n\n\tconsole.log( external( foo ) );\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/04.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tglobal.myModule = factory()\n}(this, function () { 'use strict';\n\n\tvar answer = 42;\n\n\tvar main = answer * 2;\n\n\treturn main;\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/06.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('utils/external')) :\n\ttypeof define === 'function' && define.amd ? define(['utils/external'], factory) :\n\tfactory(global.external)\n}(this, function (external) { 'use strict';\n\n\tvar message = 'this is a message';\n\n\tconsole.log( message );\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/07.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar foo = 'this is foo';\n\n\tfunction logFoo () {\n\t\tconsole.log( foo );\n\t}\n\n\tfunction logBar () {\n\t\tconsole.log( bar );\n\t}\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/08.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('external')) :\n\ttypeof define === 'function' && define.amd ? define(['external'], factory) :\n\tfactory(global.ImplicitlyNamed)\n}(this, function (ImplicitlyNamed) { 'use strict';\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/09.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('external')) :\n\ttypeof define === 'function' && define.amd ? define(['external'], factory) :\n\tfactory(global.Correct)\n}(this, function (Correct) { 'use strict';\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/10.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tglobal.myModule = factory()\n}(this, function () { 'use strict';\n\n\tclass Foo {\n\t\tconstructor( str ) {\n\t\t\tthis.str = str;\n\t\t}\n\n\t\ttoString() {\n\t\t\treturn this.str;\n\t\t}\n\t}\n\n\treturn Foo;\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/14.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('external')) :\n\ttypeof define === 'function' && define.amd ? define(['external'], factory) :\n\tfactory(global.foo)\n}(this, function (foo) { 'use strict';\n\n\tfoo();\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/16.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction _a__a () {\n\t\tconsole.log( 'a' );\n\t}\n\n\tfunction c__a () {\n\t\tconsole.log( 'a but actually c' );\n\t}\n\n\tvar b = function () {\n\t\t// a but actually c\n\t\tc__a();\n\t}\n\n\tfunction foo () {\n\t\t_a__a();\n\t}\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/17.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction foo__a ( message ) {\n\t\tconsole.log( message );\n\t}\n\n\tfoo__a();\n\t(function () {\n\t\tvar a = 'c';\n\t\tfoo__a( a );\n\t}());\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/18.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar _doThing = function () {\n\t\tconsole.log( 'doing foo thing' );\n\t}\n\n\tvar foo = function () {\n\t\t_doThing();\n\t}\n\n\tvar bar = function () {\n\t\tdoThing();\n\t}\n\n\tvar doThing = function ( item ) {\n\t\tconsole.log( 'doing bar thing' );\n\t}\n\n\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/19.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\tconsole.log( hasOwnProperty.call({ foo: 'bar' }, 'foo' ) );\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/20.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tglobal.myModule = factory()\n}(this, function () { 'use strict';\n\n\tvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\tvar main = function () {\n\t\tconsole.log( hasOwnProperty.call({ foo: 'bar' }, 'foo' ) );\n\t}\n\n\treturn main;\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/21.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tconst config = {};\n\n\tconfig.async = true;\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/24.js",
    "content": "/* this is a banner */\n(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'fooing' );\n\t}\n\n\tfunction bar () {\n\t\tconsole.log( 'baring' );\n\t}\n\n\tfoo();\n\tbar();\n\n}));\n/* this is a footer */"
  },
  {
    "path": "test/bundle/output/umdDefaults/25.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define('myModule', factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar foo = function () {\n\t\tconsole.log( 'fooing' );\n\t}\n\n\tfoo();\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/26.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction bar () {\n\t\tconsole.log( 'baring' );\n\t}\n\n\tbar();\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/27.js",
    "content": "(function (factory) {\n  !(typeof exports === 'object' && typeof module !== 'undefined') &&\n  typeof define === 'function' && define.amd ? define(factory) :\n  factory()\n}(function () { 'use strict';\n\n  var foo = 'this is foo';\n\n  var bar = 'this is bar';\n\n  function logFoo () {\n    console.log( foo );\n  }\n\n  function logBar () {\n    console.log( bar );\n  }\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/28.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar foo = () => undefined;\n\n\tassert.strictEqual( undefined, undefined );\n\n\tvar ctx = {};\n\tvar arrow = (x => assert.strictEqual( undefined, undefined ));\n\tvar fn = function () { assert.strictEqual( this, ctx ); };\n\n\tarrow.call(ctx);\n\tfn.call(ctx);\n\n\tassert.strictEqual(foo(), undefined);\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/30.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('foo')) :\n\ttypeof define === 'function' && define.amd ? define(['foo'], factory) :\n\tfactory(global.foo)\n}(this, function (foo) { 'use strict';\n\n\tfoo.bar();\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/31.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction someOtherName () {}\n\n\tfunction x () {}\n\n\tsomeOtherName();\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/32.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/33.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar _Promise__Promise = function () {};\n\n\t_Promise__Promise.prototype = {\n\t\tkeep () { this.state = 'kept'; },\n\t\tbreak () { this.state = 'broken'; }\n\t};\n\n\tvar _Promise = _Promise__Promise;\n\n\tvar _Math = {\n\t\tget add () { return add; },\n\t\tget multiply () { return multiply; }\n\t};\n\n\tfunction add ( a, b ) {\n\t\treturn a + b;\n\t}\n\n\tfunction multiply ( a, b ) {\n\t\treturn a * b;\n\t}\n\n\tvar num = Math.max( 1, 2, 3 );\n\tvar resolved = Promise.resolve( num );\n\n\tfunction foo () {\n\t\treturn resolved;\n\t}\n\n\tvar promise = new _Promise();\n\tpromise.keep();\n\n\tconsole.log( _Math.add( 40, 2 ) );\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/34.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tglobal.myModule = factory()\n}(this, function () { 'use strict';\n\n\tvar foo__exports = {};\n\tfoo__exports.bar = function () {\n\t\tconsole.log( 'exports should be renamed' );\n\t};\n\n\tvar foo = foo__exports;\n\n\tfoo.bar();\n\n\tvar main = 'whatever';\n\n\treturn main;\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/35.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction a () {\n\t\tconsole.log( 'I am module a' );\n\t}\n\n\tfunction c () {\n\t\tconsole.log( 'I am module c' );\n\t}\n\n\tfunction b () {\n\t\tconsole.log( 'I am module b' );\n\t\tc();\n\t}\n\n\tfunction external () {\n\t\tconsole.log( 'I am an external dependency' );\n\t\ta();\n\t\tb();\n\t}\n\n\texternal();\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/36.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction dependsOnExternal () {\n\t\tconsole.log( external.message );\n\t}\n\n\tfunction external () {\n\t\tdependsOnExternal();\n\t}\n\n\texternal.message = 'don\\'t try this at home';\n\n\texternal();\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/37.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('moment')) :\n\ttypeof define === 'function' && define.amd ? define(['moment'], factory) :\n\tfactory(global.x)\n}(this, function (x) { 'use strict';\n\n\tvar a__x = 'wut';\n\tvar a = a__x;\n\n\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/38.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar _foo = notActuallyFoo;\n\n\tfunction notActuallyFoo () {\n\t\tfoo();\n\t}\n\n\tfunction foo () {\n\t\tconsole.log( 'actually foo' );\n\t}\n\n\t_foo();\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/40.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/42.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/43.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('bar')) :\n\ttypeof define === 'function' && define.amd ? define(['bar'], factory) :\n\tfactory(global.Bar)\n}(this, function (Bar) { 'use strict';\n\n\tclass Foo extends Bar {\n\t\tconstructor() {\n\t\t\tsuper();\n\t\t\tconsole.log('Foo constructed');\n\t\t}\n\t}\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/44.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('foo'), require('bar')) :\n\ttypeof define === 'function' && define.amd ? define(['foo', 'bar'], factory) :\n\tfactory(global.foo, global._bar)\n}(this, function (foo, _bar) { 'use strict';\n\n\n\n\t(function () {\n\t\tvar bar = 'nope';\n\t\t_bar();\n\t})();\n\n\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/45.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar bar = 42;\n\n\tfunction foo () {\n\t\tconsole.log( bar );\n\t}\n\n\tfoo();\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/46.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar bar = 42;\n\n\tfunction foo () {\n\t\tconsole.log( bar );\n\t}\n\n\tfoo();\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/47.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () {\n\n\timplicitGlobal = 'lol';\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/48.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('external')) :\n\ttypeof define === 'function' && define.amd ? define(['external'], factory) :\n\tfactory(global.external)\n}(this, function (external) { 'use strict';\n\n\texternal();\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/49.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n}));\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,xyz"
  },
  {
    "path": "test/bundle/output/umdDefaults/50.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tclass A {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating A' );\n\t\t}\n\n\t\tb () {\n\t\t\treturn new B();\n\t\t}\n\t}\n\n\tclass B extends A {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating B' );\n\t\t}\n\t}\n\n\tclass D {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating D' );\n\t\t}\n\n\t\tc () {\n\t\t\treturn new C();\n\t\t}\n\t}\n\n\tclass C extends D {\n\t\tconstructor () {\n\t\t\tconsole.log( 'creating C' );\n\t\t}\n\t}\n\n\tnew A().b();\n\tnew B();\n\tnew C();\n\tnew D().c();\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/51.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('highlight.js')) :\n\ttypeof define === 'function' && define.amd ? define(['highlight.js'], factory) :\n\tfactory(global.highlight)\n}(this, function (highlight) { 'use strict';\n\n\tvar foo = 42;\n\n\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/52.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar not_baz = function () {\n\t\t// baz.js\n\t};\n\n\n\n\t// bar.js\n\tconsole.log( 'baz', not_baz );\n\n\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/53.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tglobal.myModule = factory()\n}(this, function () { 'use strict';\n\n\tvar foo = function () {\n\t\tconsole.log( 'foo' );\n\t}\n\n\tfoo();\n\n\tvar main = function () {\n\t\tconsole.log( 'main' );\n\t}\n\n\treturn main;\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/54.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('bluebird')) :\n\ttypeof define === 'function' && define.amd ? define(['bluebird'], factory) :\n\tfactory(global.bluebird)\n}(this, function (bluebird) { 'use strict';\n\n\tvar foo = 'foo';\n\n\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/55.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tclass A {\n\t\tb () {\n\t\t\treturn new B();\n\t\t}\n\n\t\tc () {\n\t\t\treturn new C();\n\t\t}\n\t}\n\n\tclass B extends A {}\n\n\tclass C extends A {}\n\n\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/56.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar foo = 42;\n\tvar _foo = foo;\n\tfoo = 99;\n\tfoo += 1;\n\tfoo++;\n\n\tconsole.log( _foo ); // 42\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/57.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar foo = {\n\t\tget y () { return x; }\n\t};\n\n\tvar x = 42;\n\n\tconsole.log( foo.y );\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/59.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar foo = 'foo';\n\n\tconsole.log( foo ); // 'foo'\n\n}));"
  },
  {
    "path": "test/bundle/output/umdDefaults/60.js",
    "content": "(function (factory) {\r\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\r\n\ttypeof define === 'function' && define.amd ? define(factory) :\r\n\tfactory()\r\n}(function () { 'use strict';\r\n\r\n\tvar foo = 'foo';\r\n\r\n\tvar bar = 'bar';\r\n\r\n\t// Preserve comments after imports\r\n\r\n\tconsole.log( foo );\r\n\r\n}));"
  },
  {
    "path": "test/es6-module-transpiler-tests/README.md",
    "content": "These tests are taken from the [esnext/es6-module-transpiler](https://github.com/esnext/es6-module-transpiler/tree/master/test/examples) test suite. Unlike the other tests in this project, which ensure that converted modules have the correct *form*, these tests ensure that the *semantics* of ES6 modules are faithfully represented.\n\nI'm grateful to the es6-module-transpiler project for producing these test cases and making them available under an [Apache 2.0 license](https://github.com/esnext/es6-module-transpiler/blob/master/LICENSE), and in particular to [Thomas Boyt](https://github.com/thomasboyt) for [pointing me towards them](https://news.ycombinator.com/item?id=8198649).\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/bare-import.js",
    "content": "'use strict';\n\nglobal.sideEffectyValue = 99;\n\nassert.equal(global.sideEffectyValue, 99);"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/bindings.js",
    "content": "'use strict';\n\nvar count = 0;\n\nfunction incr() {\n  count++;\n}\n\nassert.equal(count, 0);\nincr();\nassert.equal(count, 1);"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/cycles-defaults.js",
    "content": "'use strict';\n\nvar b = { b: 2, get a() { return a.a; } };\n\nvar a = { a: 1, get b() { return b.b; } };\n\nassert.equal(a.a, 1);\nassert.equal(a.b, 2);\nassert.equal(b.a, 1);\nassert.equal(b.b, 2);"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/cycles-immediate.js",
    "content": "'use strict';\n\nfunction nextOdd(n) {\n  return isEven(n) ? n + 1 : n + 2;\n}\n\n/**\n * We go through these gymnastics to eager-bind to isEven. This is done to\n * ensure that both this module and the 'evens' module eagerly use something\n * from the other.\n */\nvar isOdd = (function(isEven) {\n  return function(n) {\n    return !isEven(n);\n  };\n})(isEven);\n\n/**\n * We go through these gymnastics to eager-bind to nextOdd. This is done to\n * ensure that both this module and the 'odds' module eagerly use something\n * from the other.\n */\nvar nextEven = (function() {\n  return function(n) {\n    var no = nextOdd(n);\n    return (no === n + 2) ?\n      no - 1 : no;\n  };\n})(nextOdd);\n\nfunction isEven(n) {\n  return n % 2 === 0;\n}\n\n/**\n * The 'evens' and 'odds' modules are configured in such a way that they both\n * have two exported functions: isEven, nextEven, isOdd, and nextOdd. Normally\n * these four functions could be in any order regardless of which depends on\n * which because of JavaScript function hoisting.\n *\n * For the purposes of our test we need to prevent function hoisting, so it has\n * been arranged that two of them will be function expressions assigned to\n * variables. Specifically, isOdd and nextEven both eagerly evaluate their\n * dependencies (i.e. isEven and nextOdd). This allows us to test that exported\n * function declarations are available before what would be a module's\n * \"execute\" step, per the spec.\n */\nassert.equal(nextEven(1), 2);\nassert.equal(nextOdd(1), 3);\nassert.ok(isOdd(1));\nassert.ok(!isOdd(0));\nassert.ok(isEven(0));\nassert.ok(!isEven(1));"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/cycles.js",
    "content": "'use strict';\n\nfunction geta() {\n  return a;\n}\n\nvar b = 2;\n\nfunction getb() {\n  return b;\n}\n\nvar a = 1;\n\nassert.equal(geta(), 1);\nassert.equal(a, 1);\nassert.equal(getb(), 2);\nassert.equal(b, 2);"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/export-and-import-reference-share-var.js",
    "content": "'use strict';\n\nvar a = 1;\nassert.equal(a, 1);\n\n// This variable declaration is going to be altered because `b` needs to be\n// re-written. We need to make sure that the `a` re-writing and the unaffected\n// `c` declarator are not being clobbered by that alteration.\nvar a_ = a, b = 9, c = 'c';\n\nassert.equal(a, 1);\nassert.equal(a_, 1);\nassert.equal(b, 9);\nassert.equal(c, 'c');\n\nexports.b = b;"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/export-default-function.js",
    "content": "'use strict';\n\nvar fn1 = function () {\n  return 1;\n}\n\nassert.equal(fn1(), 1);\nassert.equal(fn1(), 1);"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/export-default-named-function.js",
    "content": "'use strict';\n\nfunction foo() {\n  return 1;\n}\n\nfunction callsFoo() {\n  return foo();\n}\n\nassert.strictEqual(foo(), 1);\nassert.strictEqual(callsFoo(), 1);"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/export-default.js",
    "content": "'use strict';\n\nvar a = 42;\n\nfunction change() {\n  a++;\n}\n\nassert.equal(a, 42);\nvar value = a;\n\n// Any replacement for the `export default` above needs to happen in the same\n// location. It cannot be done, say, at the end of the file. Otherwise the new\n// value of `a` will be used and will be incorrect.\na = 0;\nassert.equal(a, 0);\n\nassert.equal(value, 42);\n\nchange();\nassert.equal(\n  value,\n  42,\n  'default export should not be bound'\n);"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/export-from-default.js",
    "content": "'use strict';\n\nvar first = 1;\n\n\n\nassert.equal(first, 1);"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/export-from.js",
    "content": "'use strict';\n\nvar first__a = 1;\n\nassert.equal(typeof a, 'undefined');\n\nassert.equal(first__a, 1);"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/export-function.js",
    "content": "'use strict';\n\nfunction foo() {\n  return 121;\n}\nassert.equal(foo(), 121);\n\nassert.equal(foo(), 121);"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/export-list.js",
    "content": "'use strict';\n\nvar a = 1;\nvar b = 2;\n\nfunction incr() {\n  var c = a++; // Capture `a++` to force us to use a temporary variable.\n  b++;\n}\n\nassert.equal(a, 1);\nassert.equal(b, 2);\nincr();\nassert.equal(a, 2);\nassert.equal(b, 3);"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/export-mixins.js",
    "content": "'use strict';\n\nvar exporter = 1;\nvar bar = 2;\n\nassert.equal(exporter, 1);\nassert.equal(bar, 2);"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/export-var.js",
    "content": "'use strict';\n\nvar a = 1;\nassert.equal(a, 1);\n\nassert.equal(a, 1);"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/import-as.js",
    "content": "'use strict';\n\nvar exporter__a = 'a';\nvar exporter__b = 'b';\nvar exporter = 'DEF';\n\nassert.equal(exporter__a, 'a');\nassert.equal(exporter__b, 'b');\nassert.equal(exporter, 'DEF');"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/import-chain.js",
    "content": "'use strict';\n\nvar value = 42;\n\n\n\nassert.equal(value, 42);"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/import-order.js",
    "content": "'use strict';\n\nglobal.myGlobalFunction = function(){\n\treturn 42;\n};\n\nglobal.sideEffectyOutput = global.myGlobalFunction();\n\nassert.equal(global.sideEffectyOutput, 42);"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/module-level-declarations.js",
    "content": "'use strict';\n\nvar a = 1;\n\nassert.equal(a, 1);\nassert.equal(getA(), 1);\n\nfunction getA() {\n  return a;\n}"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/named-function-expression.js",
    "content": "'use strict';\n\nvar a = 1;\n\nvar getA = function getA() {\n  var a = 2;\n  return a;\n};\n\nassert.strictEqual(a, 1);\nassert.strictEqual(getA(), 2);"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/namespaces.js",
    "content": "'use strict';\n\nvar exporter = {\n\tget a () { return a; },\n\tget b () { return b; },\n\tget default () { return exporter__default; }\n};\n\nvar a = 'a';\nvar b = 'b';\nvar exporter__default = 'DEF';\n\nassert.equal(exporter['default'], 'DEF');\nassert.equal(exporter.b, 'b');\nassert.equal(exporter.a, 'a');\n\nvar keys = [];\nfor (var key in exporter) {\n  keys.push(key);\n}\nassert.deepEqual(keys.sort(), ['a', 'b', 'default']);"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/re-export-default-import.js",
    "content": "'use strict';\n\nfunction hi() {\n  return 'hi';\n}\n\n/* jshint esnext:true */\n\nassert.equal(hi(), 'hi');"
  },
  {
    "path": "test/es6-module-transpiler-tests/bundled-output/this-binding-undefined.js",
    "content": "'use strict';\n\nassert.strictEqual( undefined, undefined );\n\nvar ctx = {};\nvar fn = function () { assert.strictEqual( this, ctx ); };\nfn.call(ctx);"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/bare-import/_config.js",
    "content": "module.exports = {\n\tentry: 'importer'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/bare-import/exporter.js",
    "content": "global.sideEffectyValue = 99;\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/bare-import/importer.js",
    "content": "import './exporter';\n\nassert.equal(global.sideEffectyValue, 99);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/bindings/_config.js",
    "content": "module.exports = {\n\tentry: 'importer'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/bindings/exporter.js",
    "content": "export var count = 0;\n\nexport function incr() {\n  count++;\n}\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/bindings/importer.js",
    "content": "import { count, incr } from './exporter';\n\nassert.equal(count, 0);\nincr();\nassert.equal(count, 1);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/cycles/_config.js",
    "content": "module.exports = {\n\tentry: 'c'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/cycles/a.js",
    "content": "import { b } from './b';\n\nexport function getb() {\n  return b;\n}\n\nexport var a = 1;\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/cycles/b.js",
    "content": "import { a } from './a';\n\nexport function geta() {\n  return a;\n}\n\nexport var b = 2;\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/cycles/c.js",
    "content": "import { a, getb } from './a';\nimport { b, geta } from './b';\n\nassert.equal(geta(), 1);\nassert.equal(a, 1);\nassert.equal(getb(), 2);\nassert.equal(b, 2);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/cycles-defaults/_config.js",
    "content": "module.exports = {\n\tentry: 'importer'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/cycles-defaults/a.js",
    "content": "import b from './b';\n\nexport default { a: 1, get b() { return b.b; } };\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/cycles-defaults/b.js",
    "content": "import a from './a';\n\nexport default { b: 2, get a() { return a.a; } };\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/cycles-defaults/importer.js",
    "content": "import a from './a';\nimport b from './b';\n\nassert.equal(a.a, 1);\nassert.equal(a.b, 2);\nassert.equal(b.a, 1);\nassert.equal(b.b, 2);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/cycles-immediate/_config.js",
    "content": "module.exports = {\n\tentry: 'main'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/cycles-immediate/evens.js",
    "content": "import { nextOdd } from './odds';\n\n/**\n * We go through these gymnastics to eager-bind to nextOdd. This is done to\n * ensure that both this module and the 'odds' module eagerly use something\n * from the other.\n */\nexport var nextEven = (function() {\n  return function(n) {\n    var no = nextOdd(n);\n    return (no === n + 2) ?\n      no - 1 : no;\n  };\n})(nextOdd);\n\nexport function isEven(n) {\n  return n % 2 === 0;\n}\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/cycles-immediate/main.js",
    "content": "/**\n * The 'evens' and 'odds' modules are configured in such a way that they both\n * have two exported functions: isEven, nextEven, isOdd, and nextOdd. Normally\n * these four functions could be in any order regardless of which depends on\n * which because of JavaScript function hoisting.\n *\n * For the purposes of our test we need to prevent function hoisting, so it has\n * been arranged that two of them will be function expressions assigned to\n * variables. Specifically, isOdd and nextEven both eagerly evaluate their\n * dependencies (i.e. isEven and nextOdd). This allows us to test that exported\n * function declarations are available before what would be a module's\n * \"execute\" step, per the spec.\n */\nimport { nextEven, isEven } from './evens';\nimport { nextOdd, isOdd } from './odds';\n\nassert.equal(nextEven(1), 2);\nassert.equal(nextOdd(1), 3);\nassert.ok(isOdd(1));\nassert.ok(!isOdd(0));\nassert.ok(isEven(0));\nassert.ok(!isEven(1));\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/cycles-immediate/odds.js",
    "content": "import { isEven } from './evens';\n\nexport function nextOdd(n) {\n  return isEven(n) ? n + 1 : n + 2;\n}\n\n/**\n * We go through these gymnastics to eager-bind to isEven. This is done to\n * ensure that both this module and the 'evens' module eagerly use something\n * from the other.\n */\nexport var isOdd = (function(isEven) {\n  return function(n) {\n    return !isEven(n);\n  };\n})(isEven);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/duplicate-import-fails/_config.js",
    "content": "module.exports = {\n\tentry: 'importer',\n\texpectedError: 'Duplicated import (\\'a\\')'\n};\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/duplicate-import-fails/exporter.js",
    "content": "export var a = 1;"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/duplicate-import-fails/importer.js",
    "content": "/* error: type=SyntaxError message=\"expected one declaration for `a`, at importer.js:7:14 but found 2\" */\nimport { a } from './exporter';\nimport { a } from './exporter';\n\nassert.equal(a, 1);"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/duplicate-import-specifier-fails/_config.js",
    "content": "module.exports = {\n\tentry: 'importer',\n\texpectedError: 'Duplicated import (\\'a\\')'\n};\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/duplicate-import-specifier-fails/exporter.js",
    "content": "export var a = 1;"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/duplicate-import-specifier-fails/importer.js",
    "content": "/* error: type=SyntaxError message=\"expected one declaration for `a`, at importer.js:5:14 but found 2\" */\nimport { a, a } from './exporter';\nassert.equal(a, 1);"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-and-import-reference-share-var/_config.js",
    "content": "module.exports = {\n\tentry: 'second'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-and-import-reference-share-var/first.js",
    "content": "export var a = 1;\nassert.equal(a, 1);"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-and-import-reference-share-var/second.js",
    "content": "import { a } from './first';\n\n// This variable declaration is going to be altered because `b` needs to be\n// re-written. We need to make sure that the `a` re-writing and the unaffected\n// `c` declarator are not being clobbered by that alteration.\nvar a_ = a, b = 9, c = 'c';\n\nassert.equal(a, 1);\nassert.equal(a_, 1);\nassert.equal(b, 9);\nassert.equal(c, 'c');\n\nexport { b };\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-default/_config.js",
    "content": "module.exports = {\n\tentry: 'importer'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-default/exporter.js",
    "content": "var a = 42;\n\nexport function change() {\n  a++;\n}\n\nassert.equal(a, 42);\nexport default a;\n\n// Any replacement for the `export default` above needs to happen in the same\n// location. It cannot be done, say, at the end of the file. Otherwise the new\n// value of `a` will be used and will be incorrect.\na = 0;\nassert.equal(a, 0);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-default/importer.js",
    "content": "import value from './exporter';\nimport { change } from './exporter';\nassert.equal(value, 42);\n\nchange();\nassert.equal(\n  value,\n  42,\n  'default export should not be bound'\n);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-default-function/_config.js",
    "content": "module.exports = {\n\tentry: 'importer'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-default-function/exporter.js",
    "content": "export default function () {\n  return 1;\n}\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-default-function/importer.js",
    "content": "import fn1 from './exporter';\n\nimport { default as fn2 } from './exporter';\n\nassert.equal(fn1(), 1);\nassert.equal(fn2(), 1);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-default-named-function/_config.js",
    "content": "module.exports = {\n\tentry: 'importer'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-default-named-function/exporter.js",
    "content": "export default function foo() {\n  return 1;\n}\n\nexport function callsFoo() {\n  return foo();\n}"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-default-named-function/importer.js",
    "content": "import foo, { callsFoo } from './exporter';\n\nassert.strictEqual(foo(), 1);\nassert.strictEqual(callsFoo(), 1);"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-from/_config.js",
    "content": "module.exports = {\n\tentry: 'third'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-from/first.js",
    "content": "export var a = 1;\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-from/second.js",
    "content": "export { a } from './first';\n\n// This `a` reference should not be re-written because this export is not\n// creating a local binding.\nassert.equal(typeof a, 'undefined');\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-from/third.js",
    "content": "import { a } from './second';\nassert.equal(a, 1);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-from-default/_config.js",
    "content": "module.exports = {\n\tentry: 'third'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-from-default/first.js",
    "content": "export default 1;\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-from-default/second.js",
    "content": "export { default } from './first';\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-from-default/third.js",
    "content": "import a from './second';\nassert.equal(a, 1);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-function/_config.js",
    "content": "module.exports = {\n\tentry: 'importer'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-function/exporter.js",
    "content": "export function foo() {\n  return 121;\n}\nassert.equal(foo(), 121);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-function/importer.js",
    "content": "import { foo } from './exporter';\nassert.equal(foo(), 121);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-list/_config.js",
    "content": "module.exports = {\n\tentry: 'importer'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-list/exporter.js",
    "content": "var a = 1;\nvar b = 2;\n\nfunction incr() {\n  var c = a++; // Capture `a++` to force us to use a temporary variable.\n  b++;\n}\n\nexport { a, b, incr };\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-list/importer.js",
    "content": "import { a, b, incr } from './exporter';\n\nassert.equal(a, 1);\nassert.equal(b, 2);\nincr();\nassert.equal(a, 2);\nassert.equal(b, 3);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-mixins/_config.js",
    "content": "module.exports = {\n\tentry: 'importer'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-mixins/exporter.js",
    "content": "export default 1;\nexport var bar = 2;\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-mixins/importer.js",
    "content": "import foo, { bar } from './exporter';\n\nassert.equal(foo, 1);\nassert.equal(bar, 2);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-not-at-top-level-fails/_config.js",
    "content": "module.exports = {\n\tentry: 'index',\texpectedError: \"import' and 'export' may only appear at the top level\"\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-not-at-top-level-fails/index.js",
    "content": "function foo() {\n  /* error: type=Error message=\"Line 5: Unexpected reserved word\" */\n  export { foo };\n}\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-var/_config.js",
    "content": "module.exports = {\n\tentry: 'importer'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-var/exporter.js",
    "content": "export var a = 1;\nassert.equal(a, 1);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/export-var/importer.js",
    "content": "import { a } from './exporter';\nassert.equal(a, 1);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/import-as/_config.js",
    "content": "module.exports = {\n\tentry: 'importer'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/import-as/exporter.js",
    "content": "export var a = 'a';\nexport var b = 'b';\nexport default 'DEF';\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/import-as/importer.js",
    "content": "import { a as b, b as a, default as def } from './exporter';\n\nassert.equal(b, 'a');\nassert.equal(a, 'b');\nassert.equal(def, 'DEF');\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/import-chain/_config.js",
    "content": "module.exports = {\n\tentry: 'third'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/import-chain/first.js",
    "content": "export var value = 42;\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/import-chain/second.js",
    "content": "import { value } from './first';\nexport { value };\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/import-chain/third.js",
    "content": "import { value } from './second';\nassert.equal(value, 42);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/import-not-at-top-level-fails/_config.js",
    "content": "module.exports = {\n\tentry: 'index',\texpectedError: \"import' and 'export' may only appear at the top level\"\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/import-not-at-top-level-fails/index.js",
    "content": "function foo() {\n  /* error: type=Error message=\"Line 5: Unexpected reserved word\" */\n  import foo from './index';\n}\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/import-order/_config.js",
    "content": "module.exports = {\n\tentry: 'importer'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/import-order/consumer.js",
    "content": "global.sideEffectyOutput = global.myGlobalFunction();\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/import-order/exporter.js",
    "content": "global.myGlobalFunction = function(){\n\treturn 42;\n};\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/import-order/importer.js",
    "content": "import './exporter';\nimport './consumer';\n\nassert.equal(global.sideEffectyOutput, 42);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/module-level-declarations/_config.js",
    "content": "module.exports = {\n\tentry: 'mod'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/module-level-declarations/mod.js",
    "content": "var a = 1;\n\nassert.equal(a, 1);\nassert.equal(getA(), 1);\n\nfunction getA() {\n  return a;\n}"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/named-function-expression/_config.js",
    "content": "module.exports = {\n\tentry: 'importer'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/named-function-expression/exporter.js",
    "content": "export var a = 1;"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/named-function-expression/importer.js",
    "content": "import { a } from './exporter';\n\nvar getA = function getA() {\n  var a = 2;\n  return a;\n};\n\nassert.strictEqual(a, 1);\nassert.strictEqual(getA(), 2);"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/namespace-reassign-import-fails/_config.js",
    "content": "module.exports = {\n\tentry: 'importer',\texpectedError: 'Cannot reassign imported binding of namespace `exp`'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/namespace-reassign-import-fails/exporter.js",
    "content": "export var foo = 1;"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/namespace-reassign-import-fails/importer.js",
    "content": "import * as exp from './exporter';\n\n/* error: type=SyntaxError message=\"Cannot reassign imported binding `foo` at importer.js:6:1\" */\nexp.foo = 2;"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/namespace-update-import-fails/_config.js",
    "content": "module.exports = {\n\tentry: 'importer',\texpectedError: 'Cannot reassign imported binding of namespace `exp`'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/namespace-update-import-fails/exporter.js",
    "content": "export var foo = 1;"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/namespace-update-import-fails/importer.js",
    "content": "import * as exp from './exporter';\n\n/* error: type=SyntaxError message=\"Cannot reassign imported binding of namespace `exp` at importer.js:6:1\" */\nexp['foo']++;"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/namespaces/_config.js",
    "content": "module.exports = {\n\tentry: 'importer'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/namespaces/exporter.js",
    "content": "export var a = 'a';\nexport var b = 'b';\nexport default 'DEF';\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/namespaces/importer.js",
    "content": "import * as foo from './exporter';\n\nassert.equal(foo['default'], 'DEF');\nassert.equal(foo.b, 'b');\nassert.equal(foo.a, 'a');\n\nvar keys = [];\nfor (var key in foo) {\n  keys.push(key);\n}\nassert.deepEqual(keys.sort(), ['a', 'b', 'default']);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/re-export-default-import/_config.js",
    "content": "module.exports = {\n\tentry: 'third'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/re-export-default-import/first.js",
    "content": "export default function hi() {\n  return 'hi';\n}\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/re-export-default-import/second.js",
    "content": "/* jshint esnext:true */\nimport hi from './first';\nexport { hi };\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/re-export-default-import/third.js",
    "content": "import { hi } from './second';\nassert.equal(hi(), 'hi');\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/reassign-import-fails/_config.js",
    "content": "module.exports = {\n\tentry: 'importer',\texpectedError: 'Cannot reassign imported binding `x`'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/reassign-import-fails/exporter.js",
    "content": "export var x = 1;"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/reassign-import-fails/importer.js",
    "content": "import { x } from './exporter';\n\n(function() {\n    for(var x = 0; x < 1; x++){}\n    for(var x = 0; x < 1; x++){}\n});\n\n/* error: type=SyntaxError message=\"Cannot reassign imported binding `x` at importer.js:11:1\" */\nx = 10;\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/reassign-import-not-at-top-level-fails/_config.js",
    "content": "module.exports = {\n\tentry: 'importer',\texpectedError: 'Cannot reassign imported binding `x`'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/reassign-import-not-at-top-level-fails/exporter.js",
    "content": "export var x = 1;\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/reassign-import-not-at-top-level-fails/importer.js",
    "content": "import { x } from './exporter';\n\nexport function foo () {\n  var x = 1;\n}\nexport function bar () {\n  /* error: type=SyntaxError message=\"Cannot reassign imported binding `x` at importer.js:10:3\" */\n  x = 1;\n}\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/this-binding-undefined/_config.js",
    "content": "module.exports = {\n\tentry: 'mod'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/this-binding-undefined/mod.js",
    "content": "assert.strictEqual( this, undefined );\n\nvar ctx = {};\nvar fn = function () { assert.strictEqual( this, ctx ); };\nfn.call(ctx);\n"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/update-expression-of-import-fails/_config.js",
    "content": "module.exports = {\n\tentry: 'importer',\texpectedError: 'Cannot reassign imported binding `a`'\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/update-expression-of-import-fails/exporter.js",
    "content": "export var a = 0;"
  },
  {
    "path": "test/es6-module-transpiler-tests/input/update-expression-of-import-fails/importer.js",
    "content": "import { a } from './exporter';\n\n/* error: type=SyntaxError message=\"Cannot reassign imported binding `a` at importer.js:6:1\" */\na++;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/bare-import/exporter.js",
    "content": "'use strict';\n\nglobal.sideEffectyValue = 99;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/bare-import/importer.js",
    "content": "'use strict';\n\nrequire('./exporter');\n\nassert.equal(global.sideEffectyValue, 99);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/bindings/exporter.js",
    "content": "'use strict';\n\nexports.incr = incr;\n\nvar count = 0;\n\nfunction incr() {\n  count++, exports.count = count;\n}\n\nexports.count = count;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/bindings/importer.js",
    "content": "'use strict';\n\nvar exporter = require('./exporter');\n\nassert.equal(exporter.count, 0);\nexporter.incr();\nassert.equal(exporter.count, 1);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/cycles/a.js",
    "content": "'use strict';\n\nexports.getb = getb;\n\nvar b = require('./b');\n\nfunction getb() {\n  return b.b;\n}\n\nvar a = 1;\n\nexports.a = a;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/cycles/b.js",
    "content": "'use strict';\n\nexports.geta = geta;\n\nvar a = require('./a');\n\nfunction geta() {\n  return a.a;\n}\n\nvar b = 2;\n\nexports.b = b;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/cycles/c.js",
    "content": "'use strict';\n\nvar a = require('./a');\nvar b = require('./b');\n\nassert.equal(b.geta(), 1);\nassert.equal(a.a, 1);\nassert.equal(a.getb(), 2);\nassert.equal(b.b, 2);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/cycles-defaults/a.js",
    "content": "'use strict';\n\nvar b = require('./b');\n\nexports['default'] = { a: 1, get b() { return b['default'].b; } };"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/cycles-defaults/b.js",
    "content": "'use strict';\n\nvar a = require('./a');\n\nexports['default'] = { b: 2, get a() { return a['default'].a; } };"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/cycles-defaults/importer.js",
    "content": "'use strict';\n\nvar a = require('./a');\nvar b = require('./b');\n\nassert.equal(a['default'].a, 1);\nassert.equal(a['default'].b, 2);\nassert.equal(b['default'].a, 1);\nassert.equal(b['default'].b, 2);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/cycles-immediate/evens.js",
    "content": "'use strict';\n\nexports.isEven = isEven;\n\nvar odds = require('./odds');\n\n/**\n * We go through these gymnastics to eager-bind to nextOdd. This is done to\n * ensure that both this module and the 'odds' module eagerly use something\n * from the other.\n */\nvar nextEven = (function() {\n  return function(n) {\n    var no = odds.nextOdd(n);\n    return (no === n + 2) ?\n      no - 1 : no;\n  };\n})(odds.nextOdd);\n\nfunction isEven(n) {\n  return n % 2 === 0;\n}\n\nexports.nextEven = nextEven;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/cycles-immediate/main.js",
    "content": "'use strict';\n\nvar evens = require('./evens');\nvar odds = require('./odds');\n\n/**\n * The 'evens' and 'odds' modules are configured in such a way that they both\n * have two exported functions: isEven, nextEven, isOdd, and nextOdd. Normally\n * these four functions could be in any order regardless of which depends on\n * which because of JavaScript function hoisting.\n *\n * For the purposes of our test we need to prevent function hoisting, so it has\n * been arranged that two of them will be function expressions assigned to\n * variables. Specifically, isOdd and nextEven both eagerly evaluate their\n * dependencies (i.e. isEven and nextOdd). This allows us to test that exported\n * function declarations are available before what would be a module's\n * \"execute\" step, per the spec.\n */\nassert.equal(evens.nextEven(1), 2);\nassert.equal(odds.nextOdd(1), 3);\nassert.ok(odds.isOdd(1));\nassert.ok(!odds.isOdd(0));\nassert.ok(evens.isEven(0));\nassert.ok(!evens.isEven(1));"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/cycles-immediate/odds.js",
    "content": "'use strict';\n\nexports.nextOdd = nextOdd;\n\nvar evens = require('./evens');\n\nfunction nextOdd(n) {\n  return evens.isEven(n) ? n + 1 : n + 2;\n}\n\n/**\n * We go through these gymnastics to eager-bind to isEven. This is done to\n * ensure that both this module and the 'evens' module eagerly use something\n * from the other.\n */\nvar isOdd = (function(isEven) {\n  return function(n) {\n    return !isEven(n);\n  };\n})(evens.isEven);\n\nexports.isOdd = isOdd;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/duplicate-import-fails/exporter.js",
    "content": "'use strict';\n\nvar a = 1;\n\nexports.a = a;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/duplicate-import-specifier-fails/exporter.js",
    "content": "'use strict';\n\nvar a = 1;\n\nexports.a = a;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-and-import-reference-share-var/first.js",
    "content": "'use strict';\n\nvar a = 1;\nassert.equal(a, 1);\n\nexports.a = a;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-and-import-reference-share-var/second.js",
    "content": "'use strict';\n\nvar first = require('./first');\n\n// This variable declaration is going to be altered because `b` needs to be\n// re-written. We need to make sure that the `a` re-writing and the unaffected\n// `c` declarator are not being clobbered by that alteration.\nvar a_ = first.a, b = 9, c = 'c';\n\nassert.equal(first.a, 1);\nassert.equal(a_, 1);\nassert.equal(b, 9);\nassert.equal(c, 'c');\n\nexports.b = b;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-default/exporter.js",
    "content": "'use strict';\n\nexports.change = change;\n\nvar a = 42;\n\nfunction change() {\n  a++;\n}\n\nassert.equal(a, 42);\nexports['default'] = a;\n\n// Any replacement for the `export default` above needs to happen in the same\n// location. It cannot be done, say, at the end of the file. Otherwise the new\n// value of `a` will be used and will be incorrect.\na = 0;\nassert.equal(a, 0);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-default/importer.js",
    "content": "'use strict';\n\nvar value = require('./exporter');\n\nassert.equal(value['default'], 42);\n\nvalue.change();\nassert.equal(\n  value['default'],\n  42,\n  'default export should not be bound'\n);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-default-function/exporter.js",
    "content": "'use strict';\n\nexports['default'] = function () {\n  return 1;\n}"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-default-function/importer.js",
    "content": "'use strict';\n\nvar fn1 = require('./exporter');\n\nassert.equal(fn1['default'](), 1);\nassert.equal(fn1.default(), 1);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-default-named-function/exporter.js",
    "content": "'use strict';\n\nexports.callsFoo = callsFoo;\n\nfunction foo() {\n  return 1;\n}\nexports['default'] = foo;\n\nfunction callsFoo() {\n  return foo();\n}"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-default-named-function/importer.js",
    "content": "'use strict';\n\nvar exporter = require('./exporter');\n\nassert.strictEqual(exporter['default'](), 1);\nassert.strictEqual(exporter.callsFoo(), 1);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-from/first.js",
    "content": "'use strict';\n\nvar a = 1;\n\nexports.a = a;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-from/second.js",
    "content": "'use strict';\n\nObject.defineProperty(exports, 'a', { enumerable: true, get: function () { return first.a; }});\n\nvar first = require('./first');\n\nassert.equal(typeof a, 'undefined');"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-from/third.js",
    "content": "'use strict';\n\nvar second = require('./second');\n\nassert.equal(second.a, 1);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-from-default/first.js",
    "content": "'use strict';\n\nexports['default'] = 1;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-from-default/second.js",
    "content": "'use strict';\n\nObject.defineProperty(exports, 'default', { enumerable: true, get: function () { return first['default']; }});\n\nvar first = require('./first');"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-from-default/third.js",
    "content": "'use strict';\n\nvar a = require('./second');\n\nassert.equal(a['default'], 1);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-function/exporter.js",
    "content": "'use strict';\n\nexports.foo = foo;\n\nfunction foo() {\n  return 121;\n}\nassert.equal(foo(), 121);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-function/importer.js",
    "content": "'use strict';\n\nvar exporter = require('./exporter');\n\nassert.equal(exporter.foo(), 121);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-list/exporter.js",
    "content": "'use strict';\n\nexports.incr = incr;\n\nvar a = 1;\nvar b = 2;\n\nfunction incr() {\n  var c = a++; exports.a = a; // Capture `a++` to force us to use a temporary variable.\n  b++, exports.b = b;\n}\n\nexports.a = a;\nexports.b = b;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-list/importer.js",
    "content": "'use strict';\n\nvar exporter = require('./exporter');\n\nassert.equal(exporter.a, 1);\nassert.equal(exporter.b, 2);\nexporter.incr();\nassert.equal(exporter.a, 2);\nassert.equal(exporter.b, 3);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-mixins/exporter.js",
    "content": "'use strict';\n\nexports['default'] = 1;\nvar bar = 2;\n\nexports.bar = bar;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-mixins/importer.js",
    "content": "'use strict';\n\nvar exporter = require('./exporter');\n\nassert.equal(exporter['default'], 1);\nassert.equal(exporter.bar, 2);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-var/exporter.js",
    "content": "'use strict';\n\nvar a = 1;\nassert.equal(a, 1);\n\nexports.a = a;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/export-var/importer.js",
    "content": "'use strict';\n\nvar exporter = require('./exporter');\n\nassert.equal(exporter.a, 1);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/import-as/exporter.js",
    "content": "'use strict';\n\nvar a = 'a';\nvar b = 'b';\nexports['default'] = 'DEF';\n\nexports.a = a;\nexports.b = b;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/import-as/importer.js",
    "content": "'use strict';\n\nvar exporter = require('./exporter');\n\nassert.equal(exporter.a, 'a');\nassert.equal(exporter.b, 'b');\nassert.equal(exporter.default, 'DEF');"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/import-chain/first.js",
    "content": "'use strict';\n\nvar value = 42;\n\nexports.value = value;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/import-chain/second.js",
    "content": "'use strict';\n\nObject.defineProperty(exports, 'value', { enumerable: true, get: function () { return first.value; }});\n\nvar first = require('./first');"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/import-chain/third.js",
    "content": "'use strict';\n\nvar second = require('./second');\n\nassert.equal(second.value, 42);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/import-order/consumer.js",
    "content": "'use strict';\n\nglobal.sideEffectyOutput = global.myGlobalFunction();"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/import-order/exporter.js",
    "content": "'use strict';\n\nglobal.myGlobalFunction = function(){\n\treturn 42;\n};"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/import-order/importer.js",
    "content": "'use strict';\n\nrequire('./exporter');\nrequire('./consumer');\n\nassert.equal(global.sideEffectyOutput, 42);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/module-level-declarations/mod.js",
    "content": "'use strict';\n\nvar a = 1;\n\nassert.equal(a, 1);\nassert.equal(getA(), 1);\n\nfunction getA() {\n  return a;\n}"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/named-function-expression/exporter.js",
    "content": "'use strict';\n\nvar a = 1;\n\nexports.a = a;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/named-function-expression/importer.js",
    "content": "'use strict';\n\nvar exporter = require('./exporter');\n\nvar getA = function getA() {\n  var a = 2;\n  return a;\n};\n\nassert.strictEqual(exporter.a, 1);\nassert.strictEqual(getA(), 2);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/namespace-reassign-import-fails/exporter.js",
    "content": "'use strict';\n\nvar foo = 1;\n\nexports.foo = foo;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/namespace-update-import-fails/exporter.js",
    "content": "'use strict';\n\nvar foo = 1;\n\nexports.foo = foo;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/namespaces/exporter.js",
    "content": "'use strict';\n\nvar a = 'a';\nvar b = 'b';\nexports['default'] = 'DEF';\n\nexports.a = a;\nexports.b = b;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/namespaces/importer.js",
    "content": "'use strict';\n\nvar foo = require('./exporter');\n\nassert.equal(foo['default'], 'DEF');\nassert.equal(foo.b, 'b');\nassert.equal(foo.a, 'a');\n\nvar keys = [];\nfor (var key in foo) {\n  keys.push(key);\n}\nassert.deepEqual(keys.sort(), ['a', 'b', 'default']);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/re-export-default-import/first.js",
    "content": "'use strict';\n\nfunction hi() {\n  return 'hi';\n}\nexports['default'] = hi;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/re-export-default-import/second.js",
    "content": "'use strict';\n\nObject.defineProperty(exports, 'hi', { enumerable: true, get: function () { return hi['default']; }});\n\nvar hi = require('./first');\n\n/* jshint esnext:true */"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/re-export-default-import/third.js",
    "content": "'use strict';\n\nvar second = require('./second');\n\nassert.equal(second.hi(), 'hi');"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/reassign-import-fails/exporter.js",
    "content": "'use strict';\n\nvar x = 1;\n\nexports.x = x;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/reassign-import-not-at-top-level-fails/exporter.js",
    "content": "'use strict';\n\nvar x = 1;\n\nexports.x = x;"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/this-binding-undefined/mod.js",
    "content": "'use strict';\n\nassert.strictEqual( undefined, undefined );\n\nvar ctx = {};\nvar fn = function () { assert.strictEqual( this, ctx ); };\nfn.call(ctx);"
  },
  {
    "path": "test/es6-module-transpiler-tests/output/update-expression-of-import-fails/exporter.js",
    "content": "'use strict';\n\nvar a = 0;\n\nexports.a = a;"
  },
  {
    "path": "test/fastMode/index.js",
    "content": "var assert = require( 'assert' );\nvar sander = require( 'sander' );\nvar makeWhitespaceVisible = require( '../utils/makeWhitespaceVisible' );\nvar esperanto = require( '../../' );\n\nvar Promise = sander.Promise;\n\nmodule.exports = function () {\n\treturn new Promise( function ( fulfil ) {\n\t\tdescribe( 'fast mode', function () {\n\t\t\tvar tests, start;\n\n\t\t\tthis.timeout( 20000 );\n\n\t\t\ttests = [\n\t\t\t\t{ file: 'earlyExport', description: 'transpiles exports that are not the final statement' },\n\t\t\t\t{ file: 'emptyImport', description: 'transpiles empty imports with no exports' },\n\t\t\t\t{ file: 'emptyImportWithDefaultExport', description: 'transpiles empty imports with default exports' },\n\t\t\t\t{ file: 'escapedSource', description: 'preserves character escapes in source strings' },\n\t\t\t\t{ file: 'exportAnonFunction', description: 'transpiled anonymous default function exports' },\n\t\t\t\t{ file: 'exportDefault', description: 'transpiles default exports' },\n\t\t\t\t{ file: 'exportFunction', description: 'transpiles named default function exports' },\n\t\t\t\t{ file: 'importAll', description: 'transpiles `import * as foo from \"foo\"`' },\n\t\t\t\t{ file: 'importDefault', description: 'transpiles default imports' },\n\t\t\t\t{ file: 'multipleImports', description: 'transpiles multiple imports' },\n\t\t\t\t{ file: 'trailingEmptyImport', description: 'transpiles trailing empty imports' },\n\t\t\t\t{ file: 'banner', description: 'adds a banner' },\n\t\t\t\t{ file: 'footer', description: 'adds a footer' },\n\t\t\t\t{ file: 'bannerAndFooter', description: 'adds a banner and a footer' },\n\t\t\t\t{ file: 'namedAmdModule', description: 'creates a named AMD module if amdName is passed' }\n\t\t\t];\n\n\t\t\tvar tests = sander.readdirSync( __dirname, '../samples' ).map( function ( dir ) {\n\t\t\t\tvar config = require( '../samples/' + dir + '/_config' ),\n\t\t\t\t\tsource = sander.readFileSync( __dirname, '../samples', dir, 'source.js' ).toString();\n\n\t\t\t\tif ( config.ast ) {\n\t\t\t\t\tsource = {\n\t\t\t\t\t\tcode: source,\n\t\t\t\t\t\tast: config.ast\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tid: dir,\n\t\t\t\t\tconfig: config,\n\t\t\t\t\tsource: source\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tbefore( function () {\n\t\t\t\tif ( process.env.BUILD_TIMEOUT ) {\n\t\t\t\t\tthis.timeout( parseInt( process.env.BUILD_TIMEOUT ) );\n\t\t\t\t}\n\n\t\t\t\tstart = Date.now();\n\t\t\t});\n\n\t\t\tafter( function () {\n\t\t\t\tfulfil( Date.now() - start );\n\t\t\t});\n\n\t\t\tdescribe( 'esperanto.toAmd()', function () {\n\t\t\t\trunTests( 'amd', 'toAmd' );\n\t\t\t});\n\n\t\t\tdescribe( 'esperanto.toCjs()', function () {\n\t\t\t\trunTests( 'cjs', 'toCjs' );\n\t\t\t});\n\n\t\t\tdescribe( 'esperanto.toUmd()', function () {\n\t\t\t\trunTests( 'umd', 'toUmd' );\n\t\t\t});\n\n\t\t\tfunction runTests ( dir, method ) {\n\t\t\t\ttests.forEach( function ( t ) {\n\t\t\t\t\tif ( t.config.strict ) return;\n\n\t\t\t\t\t( t.config.solo ? it.only : it )( t.config.description, function () {\n\t\t\t\t\t\tvar transpiled;\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ttranspiled = esperanto[ method ]( t.source, {\n\t\t\t\t\t\t\t\tname: t.config.name || 'myModule',\n\t\t\t\t\t\t\t\tamdName: t.config.amdName,\n\t\t\t\t\t\t\t\tabsolutePaths: t.config.absolutePaths,\n\t\t\t\t\t\t\t\tbanner: t.config.banner,\n\t\t\t\t\t\t\t\tfooter: t.config.footer,\n\t\t\t\t\t\t\t\tuseStrict: t.config.useStrict\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} catch ( err ) {\n\t\t\t\t\t\t\tif ( t.config.expectedError && ~err.message.indexOf( t.config.expectedError ) ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthrow err;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( t.config.expectedError ) {\n\t\t\t\t\t\t\tthrow new Error( 'Expected error: ' + t.config.expectedError );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar actual = makeWhitespaceVisible( transpiled.code );\n\n\t\t\t\t\t\treturn sander.readFile( 'fastMode/output/' + dir, t.id + '.js' ).then( String ).then( function ( str ) {\n\t\t\t\t\t\t\tvar expected = makeWhitespaceVisible( str );\n\t\t\t\t\t\t\tassert.equal( actual, expected, 'Expected\\n>\\n' + actual + '\\n>\\n\\nto match\\n\\n>\\n' + expected + '\\n>' );\n\t\t\t\t\t\t}).catch( function ( err ) {\n\t\t\t\t\t\t\tif ( err.code === 'ENOENT' ) {\n\t\t\t\t\t\t\t\tassert.equal( actual, '', 'Expected\\n>\\n' + actual + '\\n>\\n\\nto match non-existent file' );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthrow err;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t});\n};\n"
  },
  {
    "path": "test/fastMode/output/amd/absolutePaths.js",
    "content": "define('my/nested/module', ['foo', 'my/bar', 'my/nested/baz', 'my/qux'], function (foo, bar, baz, qux) {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/banner.js",
    "content": "/* this is a banner */\ndefine(['whatever'], function (whatever) {\n\n\t'use strict';\n\n\twhatever();\n\n\n\treturn 'someExport';\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/bannerAndFooter.js",
    "content": "/* this is a banner */\ndefine(['whatever'], function (whatever) {\n\n\t'use strict';\n\n\twhatever();\n\n\n\treturn 'someExport';\n\n});\n/* this is a footer */"
  },
  {
    "path": "test/fastMode/output/amd/constructor.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\treturn function () {\n\t\tvar constructor;\n\t\tconstructor = 42;\n\t};\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/earlyExport.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'fooing' );\n\t}\n\n\treturn foo;\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/emptyImport.js",
    "content": "define(['polyfills', 'foo'], function (__dep0__, bar) {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/emptyImportWithDefaultExport.js",
    "content": "define(['foo', 'polyfills'], function (foo) {\n\n\t'use strict';\n\n\treturn 'baz';\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/escapedSource.js",
    "content": "define(['fo\\no'], function (foo) {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/exportAnonFunction.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\treturn function () {\n\t\tconsole.log( 'I am anonymous' );\n\t};\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/exportClassWithSuper.js",
    "content": "define(['bar'], function (Bar) {\n\n\t'use strict';\n\n\tclass Foo extends Bar {\n\t\tconstructor() {\n\t\t\tsuper();\n\t\t\tconsole.log('Foo constructed');\n\t\t}\n\t}\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/exportDefault.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\treturn 'foo';\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/exportFunction.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tfunction foo ( str ) {\n\t\treturn str.toUpperCase();\n\t}\n\n\treturn foo;\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/footer.js",
    "content": "define(['whatever'], function (whatever) {\n\n\t'use strict';\n\n\twhatever();\n\n\n\treturn 'someExport';\n\n});\n/* this is a footer */"
  },
  {
    "path": "test/fastMode/output/amd/importAll.js",
    "content": "define(['fs'], function (fs) {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/importDefault.js",
    "content": "define(['foo'], function (foo) {\n\n\t'use strict';\n\n\tconsole.log( foo );\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/intermediateSourcemaps.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar answer = 42;\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/multipleImports.js",
    "content": "define(['foo', 'bar', 'baz'], function (foo, bar, baz) {\n\n\t'use strict';\n\n\tvar qux = foo( bar( baz ) );\n\n\treturn qux;\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/namedAmdModule.js",
    "content": "define('myModule', ['foo'], function (foo) {\n\n\t'use strict';\n\n\tfoo();\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/preparsed.js",
    "content": "define(['./bar'], function (foo) {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/sparseArray.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\t[1,,3,4]\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/trailingEmptyImport.js",
    "content": "define(['foo', 'polyfills'], function (foo) {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/fastMode/output/amd/useStrictFalse.js",
    "content": "define(function () {\n\n\timplicitGlobal = 'lol';\n\n});"
  },
  {
    "path": "test/fastMode/output/cjs/absolutePaths.js",
    "content": "'use strict';\n\nvar foo = require('../../foo');\nvar bar = require('../bar');\nvar baz = require('./baz');\nvar qux = require('./../qux');"
  },
  {
    "path": "test/fastMode/output/cjs/banner.js",
    "content": "/* this is a banner */\n'use strict';\n\nvar whatever = require('whatever');\n\nwhatever();\n\nmodule.exports = 'someExport';"
  },
  {
    "path": "test/fastMode/output/cjs/bannerAndFooter.js",
    "content": "/* this is a banner */\n'use strict';\n\nvar whatever = require('whatever');\n\nwhatever();\n\nmodule.exports = 'someExport';\n/* this is a footer */"
  },
  {
    "path": "test/fastMode/output/cjs/constructor.js",
    "content": "'use strict';\n\nmodule.exports = function () {\n\tvar constructor;\n\tconstructor = 42;\n}"
  },
  {
    "path": "test/fastMode/output/cjs/earlyExport.js",
    "content": "'use strict';\n\nmodule.exports = foo;\n\nfunction foo () {\n\tconsole.log( 'fooing' );\n}"
  },
  {
    "path": "test/fastMode/output/cjs/emptyImport.js",
    "content": "'use strict';\n\nrequire('polyfills');\nvar bar = require('foo');"
  },
  {
    "path": "test/fastMode/output/cjs/emptyImportWithDefaultExport.js",
    "content": "'use strict';\n\nvar foo = require('foo');\nrequire('polyfills');\n\nmodule.exports = 'baz';"
  },
  {
    "path": "test/fastMode/output/cjs/escapedSource.js",
    "content": "'use strict';\n\nvar foo = require('fo\\no');"
  },
  {
    "path": "test/fastMode/output/cjs/exportAnonFunction.js",
    "content": "'use strict';\n\nmodule.exports = function () {\n\tconsole.log( 'I am anonymous' );\n}"
  },
  {
    "path": "test/fastMode/output/cjs/exportClassWithSuper.js",
    "content": "'use strict';\n\nvar Bar = require('bar');\n\nclass Foo extends Bar {\n\tconstructor() {\n\t\tsuper();\n\t\tconsole.log('Foo constructed');\n\t}\n}"
  },
  {
    "path": "test/fastMode/output/cjs/exportDefault.js",
    "content": "'use strict';\n\nmodule.exports = 'foo';"
  },
  {
    "path": "test/fastMode/output/cjs/exportFunction.js",
    "content": "'use strict';\n\nfunction foo ( str ) {\n\treturn str.toUpperCase();\n}\nmodule.exports = foo;"
  },
  {
    "path": "test/fastMode/output/cjs/footer.js",
    "content": "'use strict';\n\nvar whatever = require('whatever');\n\nwhatever();\n\nmodule.exports = 'someExport';\n/* this is a footer */"
  },
  {
    "path": "test/fastMode/output/cjs/importAll.js",
    "content": "'use strict';\n\nvar fs = require('fs');"
  },
  {
    "path": "test/fastMode/output/cjs/importDefault.js",
    "content": "'use strict';\n\nvar foo = require('foo');\n\nconsole.log( foo );"
  },
  {
    "path": "test/fastMode/output/cjs/intermediateSourcemaps.js",
    "content": "'use strict';\n\nvar answer = 42;"
  },
  {
    "path": "test/fastMode/output/cjs/multipleImports.js",
    "content": "'use strict';\n\nvar foo = require('foo');\nvar bar = require('bar');\nvar baz = require('baz');\n\nvar qux = foo( bar( baz ) );\nmodule.exports = qux;"
  },
  {
    "path": "test/fastMode/output/cjs/namedAmdModule.js",
    "content": "'use strict';\n\nvar foo = require('foo');\nfoo();"
  },
  {
    "path": "test/fastMode/output/cjs/preparsed.js",
    "content": "'use strict';\n\nvar foo = require('./bar');"
  },
  {
    "path": "test/fastMode/output/cjs/sparseArray.js",
    "content": "'use strict';\n\n[1,,3,4]"
  },
  {
    "path": "test/fastMode/output/cjs/trailingEmptyImport.js",
    "content": "'use strict';\n\nvar foo = require('foo');\nrequire('polyfills');"
  },
  {
    "path": "test/fastMode/output/cjs/useStrictFalse.js",
    "content": "implicitGlobal = 'lol';"
  },
  {
    "path": "test/fastMode/output/umd/absolutePaths.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../../foo'), require('../bar'), require('./baz'), require('./../qux')) :\n\ttypeof define === 'function' && define.amd ? define('my/nested/module', ['foo', 'my/bar', 'my/nested/baz', 'my/qux'], factory) :\n\tfactory(global.foo, global.bar, global.baz, global.qux)\n}(this, function (foo, bar, baz, qux) { 'use strict';\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/banner.js",
    "content": "/* this is a banner */\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('whatever')) :\n\ttypeof define === 'function' && define.amd ? define(['whatever'], factory) :\n\tglobal.myModule = factory(global.whatever)\n}(this, function (whatever) { 'use strict';\n\n\twhatever();\n\n\n\treturn 'someExport';\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/bannerAndFooter.js",
    "content": "/* this is a banner */\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('whatever')) :\n\ttypeof define === 'function' && define.amd ? define(['whatever'], factory) :\n\tglobal.myModule = factory(global.whatever)\n}(this, function (whatever) { 'use strict';\n\n\twhatever();\n\n\n\treturn 'someExport';\n\n}));\n/* this is a footer */"
  },
  {
    "path": "test/fastMode/output/umd/constructor.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tglobal.myModule = factory()\n}(this, function () { 'use strict';\n\n\treturn function () {\n\t\tvar constructor;\n\t\tconstructor = 42;\n\t};\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/earlyExport.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tglobal.myModule = factory()\n}(this, function () { 'use strict';\n\n\tfunction foo () {\n\t\tconsole.log( 'fooing' );\n\t}\n\n\treturn foo;\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/emptyImport.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('polyfills'), require('foo')) :\n\ttypeof define === 'function' && define.amd ? define(['polyfills', 'foo'], factory) :\n\tfactory(undefined, global.bar)\n}(this, function (__dep0__, bar) { 'use strict';\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/emptyImportWithDefaultExport.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('foo'), require('polyfills')) :\n\ttypeof define === 'function' && define.amd ? define(['foo', 'polyfills'], factory) :\n\tglobal.myModule = factory(global.foo)\n}(this, function (foo) { 'use strict';\n\n\n\treturn 'baz';\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/escapedSource.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('fo\\no')) :\n\ttypeof define === 'function' && define.amd ? define(['fo\\no'], factory) :\n\tfactory(global.foo)\n}(this, function (foo) { 'use strict';\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/exportAnonFunction.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tglobal.myModule = factory()\n}(this, function () { 'use strict';\n\n\treturn function () {\n\t\tconsole.log( 'I am anonymous' );\n\t};\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/exportClassWithSuper.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('bar')) :\n\ttypeof define === 'function' && define.amd ? define(['bar'], factory) :\n\tfactory(global.Bar)\n}(this, function (Bar) { 'use strict';\n\n\tclass Foo extends Bar {\n\t\tconstructor() {\n\t\t\tsuper();\n\t\t\tconsole.log('Foo constructed');\n\t\t}\n\t}\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/exportDefault.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tglobal.myModule = factory()\n}(this, function () { 'use strict';\n\n\n\treturn 'foo';\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/exportFunction.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tglobal.myModule = factory()\n}(this, function () { 'use strict';\n\n\tfunction foo ( str ) {\n\t\treturn str.toUpperCase();\n\t}\n\n\treturn foo;\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/footer.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('whatever')) :\n\ttypeof define === 'function' && define.amd ? define(['whatever'], factory) :\n\tglobal.myModule = factory(global.whatever)\n}(this, function (whatever) { 'use strict';\n\n\twhatever();\n\n\n\treturn 'someExport';\n\n}));\n/* this is a footer */"
  },
  {
    "path": "test/fastMode/output/umd/importAll.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('fs')) :\n\ttypeof define === 'function' && define.amd ? define(['fs'], factory) :\n\tfactory(global.fs)\n}(this, function (fs) { 'use strict';\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/importDefault.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('foo')) :\n\ttypeof define === 'function' && define.amd ? define(['foo'], factory) :\n\tfactory(global.foo)\n}(this, function (foo) { 'use strict';\n\n\tconsole.log( foo );\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/intermediateSourcemaps.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar answer = 42;\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/multipleImports.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('foo'), require('bar'), require('baz')) :\n\ttypeof define === 'function' && define.amd ? define(['foo', 'bar', 'baz'], factory) :\n\tglobal.myModule = factory(global.foo, global.bar, global.baz)\n}(this, function (foo, bar, baz) { 'use strict';\n\n\tvar qux = foo( bar( baz ) );\n\n\treturn qux;\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/namedAmdModule.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('foo')) :\n\ttypeof define === 'function' && define.amd ? define('myModule', ['foo'], factory) :\n\tfactory(global.foo)\n}(this, function (foo) { 'use strict';\n\n\tfoo();\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/preparsed.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('./bar')) :\n\ttypeof define === 'function' && define.amd ? define(['./bar'], factory) :\n\tfactory(global.foo)\n}(this, function (foo) { 'use strict';\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/sparseArray.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\t[1,,3,4]\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/trailingEmptyImport.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('foo'), require('polyfills')) :\n\ttypeof define === 'function' && define.amd ? define(['foo', 'polyfills'], factory) :\n\tfactory(global.foo)\n}(this, function (foo) { 'use strict';\n\n}));"
  },
  {
    "path": "test/fastMode/output/umd/useStrictFalse.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () {\n\n\timplicitGlobal = 'lol';\n\n}));"
  },
  {
    "path": "test/samples/absolutePaths/_config.js",
    "content": "module.exports = {\n\tdescription: 'resolves relative paths for AMD/UMD exports, if specified, but not CJS',\n\tamdName: 'my/nested/module',\n\tabsolutePaths: true\n};"
  },
  {
    "path": "test/samples/absolutePaths/source.js",
    "content": "import foo from '../../foo';\nimport bar from '../bar';\nimport baz from './baz';\nimport qux from './../qux';"
  },
  {
    "path": "test/samples/banner/_config.js",
    "content": "module.exports = {\n\tdescription: 'adds a banner',\n\tbanner: '/* this is a banner */\\n'\n};"
  },
  {
    "path": "test/samples/banner/source.js",
    "content": "import whatever from 'whatever';\n\nwhatever();\n\nexport default 'someExport';"
  },
  {
    "path": "test/samples/bannerAndFooter/_config.js",
    "content": "module.exports = {\n\tdescription: 'adds a banner and a footer',\n\tbanner: '/* this is a banner */\\n',\n\tfooter: '\\n/* this is a footer */'\n};"
  },
  {
    "path": "test/samples/bannerAndFooter/source.js",
    "content": "import whatever from 'whatever';\n\nwhatever();\n\nexport default 'someExport';"
  },
  {
    "path": "test/samples/clashingDefaultImports/_config.js",
    "content": "module.exports = {\n\tdescription: 'avoids naming collisions with default imports',\n\texpectedError: 'Duplicated import (\\'x\\')'\n};\n"
  },
  {
    "path": "test/samples/clashingDefaultImports/source.js",
    "content": "import x from 'foo';\nimport x from 'bar';\n\nx();\n"
  },
  {
    "path": "test/samples/clashingFunctionArguments/_config.js",
    "content": "module.exports = {\n\tdescription: 'prevents function arguments from shadowing imports',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/clashingFunctionArguments/source.js",
    "content": "import { foo } from 'x/y/z';\n\nexport function bar ( z ) {\n\treturn foo( z );\n}"
  },
  {
    "path": "test/samples/clashingMixedImports/_config.js",
    "content": "module.exports = {\n\t//solo: true,\n\tdescription: 'deconflicts when naming imports based on filename',\n\tstrict: true\n};\n"
  },
  {
    "path": "test/samples/clashingMixedImports/source.js",
    "content": "import { something } from 'duplicated';\nimport duplicated from 'elsewhere';\n\nexport default function() {\n\treturn [something, duplicated];\n}\n"
  },
  {
    "path": "test/samples/clashingNamedDefaultImports/_config.js",
    "content": "module.exports = {\n\tdescription: 'avoids naming collisions with mixed named/default imports',\n\tstrict: true,\n\texpectedError: 'Duplicated import (\\'x\\')'\n};\n"
  },
  {
    "path": "test/samples/clashingNamedDefaultImports/source.js",
    "content": "import { x } from 'foo';\nimport x from 'bar';\n\nx();\n"
  },
  {
    "path": "test/samples/clashingNamedImports/_config.js",
    "content": "module.exports = {\n\tdescription: 'avoids naming collisions with named imports',\n\tstrict: true,\n\texpectedError: 'Duplicated import (\\'x\\')'\n};\n"
  },
  {
    "path": "test/samples/clashingNamedImports/source.js",
    "content": "import { x } from 'foo';\nimport { x } from 'bar';\n\nx();\n"
  },
  {
    "path": "test/samples/clashingNames/_config.js",
    "content": "module.exports = {\n\tdescription: 'avoids naming collisions',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/clashingNames/source.js",
    "content": "import { bar } from 'foo';\nvar foo = 'should not clash';\n\nbar();"
  },
  {
    "path": "test/samples/clashingObjectProperties/_config.js",
    "content": "module.exports = {\n\tdescription: 'functions are not illegally/unnecessarily renamed as object properties (#122)',\n\tstrict: true\n};\n"
  },
  {
    "path": "test/samples/clashingObjectProperties/source.js",
    "content": "import { foo } from './foo';\n\nvar obj = {\n\tfoo: function foo () {}\n};\n\nfoo();\n"
  },
  {
    "path": "test/samples/conditionalExport/_config.js",
    "content": "module.exports = {\n\tdescription: 'correctly exports when binding is updated inside a block',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/conditionalExport/source.js",
    "content": "var foo = function () {};\nvar bar = 'a';\n\nif ( false ) {\n\tfoo = function () {\n\t\tbar = 'b';\n\t};\n}\n\nexport { foo, bar };"
  },
  {
    "path": "test/samples/constructor/_config.js",
    "content": "module.exports = {\n\tdescription: 'handles `constructor` edge case'\n};"
  },
  {
    "path": "test/samples/constructor/source.js",
    "content": "export default function () {\n\tvar constructor;\n\tconstructor = 42;\n}"
  },
  {
    "path": "test/samples/duplicateImportFalsePositive/_config.js",
    "content": "module.exports = {\n\tdescription: 'allows imports to be re-exported',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/duplicateImportFalsePositive/source.js",
    "content": "import { foo } from 'bar';\nexport { foo } from 'bar';"
  },
  {
    "path": "test/samples/duplicateImports/_config.js",
    "content": "module.exports = {\n\tdescription: 'de-duplicates imports',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/duplicateImports/source.js",
    "content": "import { bar } from 'foo';\nimport { baz } from 'foo';\n\nbar();\nbaz();"
  },
  {
    "path": "test/samples/earlyExport/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiles exports that are not the final statement'\n};"
  },
  {
    "path": "test/samples/earlyExport/source.js",
    "content": "export default foo;\n\nfunction foo () {\n\tconsole.log( 'fooing' );\n}\n"
  },
  {
    "path": "test/samples/emptyImport/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiles empty imports with no exports'\n};"
  },
  {
    "path": "test/samples/emptyImport/source.js",
    "content": "import 'polyfills';\nimport bar from 'foo';\n"
  },
  {
    "path": "test/samples/emptyImportWithDefaultExport/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiles empty imports with default exports'\n};"
  },
  {
    "path": "test/samples/emptyImportWithDefaultExport/source.js",
    "content": "import foo from 'foo';\nimport 'polyfills';\n\nexport default 'baz';\n"
  },
  {
    "path": "test/samples/escapedSource/_config.js",
    "content": "module.exports = {\n\tdescription: 'preserves character escapes in source strings'\n};"
  },
  {
    "path": "test/samples/escapedSource/source.js",
    "content": "import foo from 'fo\\no';\n"
  },
  {
    "path": "test/samples/exportAnonFunction/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiled anonymous default function exports'\n};"
  },
  {
    "path": "test/samples/exportAnonFunction/source.js",
    "content": "export default function () {\n\tconsole.log( 'I am anonymous' );\n}\n"
  },
  {
    "path": "test/samples/exportClass/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiles named class exports as late exports',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/exportClass/source.js",
    "content": "export class Point {}\n"
  },
  {
    "path": "test/samples/exportClassWithSuper/_config.js",
    "content": "module.exports = {\n\tdescription: 'bundles class with super (#129)'\n};"
  },
  {
    "path": "test/samples/exportClassWithSuper/source.js",
    "content": "import Bar from 'bar';\n\nclass Foo extends Bar {\n\tconstructor() {\n\t\tsuper();\n\t\tconsole.log('Foo constructed');\n\t}\n}\n"
  },
  {
    "path": "test/samples/exportDefault/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiles default exports'\n};"
  },
  {
    "path": "test/samples/exportDefault/source.js",
    "content": "export default 'foo';\n"
  },
  {
    "path": "test/samples/exportFunction/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiles named default function exports'\n};"
  },
  {
    "path": "test/samples/exportFunction/source.js",
    "content": "export default function foo ( str ) {\n\treturn str.toUpperCase();\n}\n"
  },
  {
    "path": "test/samples/exportInlineFunction/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiles named inline function exports',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/exportInlineFunction/source.js",
    "content": "export function foo ( str ) {\n\treturn str.toUpperCase();\n}\n"
  },
  {
    "path": "test/samples/exportLet/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiles named inline let exports',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/exportLet/source.js",
    "content": "export let answer = 41;\nanswer++;\n"
  },
  {
    "path": "test/samples/exportNamed/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiles named exports',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/exportNamed/source.js",
    "content": "var foo = 'bar', answer = 42;\nexport { foo, answer };\n"
  },
  {
    "path": "test/samples/exportNamedCollidesWithFunctionExpression/_config.js",
    "content": "module.exports = {\n\tdescription: 'does not interpret named function expressions as early-exportable',\n\tamdName: 'foo',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/exportNamedCollidesWithFunctionExpression/source.js",
    "content": "var foo = \"bar\";\n\nif (false) {\n\tsomeFunction = function foo() {  };\n}\n\nexport { foo };\n"
  },
  {
    "path": "test/samples/exportNamedFromNamedImportES3/_config.js",
    "content": "module.exports = {\n\tdescription: 'does not use Object.defineProperty when using _evilES3SafeReExports option',\n\tamdName: 'foo',\n\tstrict: true,\n\t_evilES3SafeReExports: true\n};\n"
  },
  {
    "path": "test/samples/exportNamedFromNamedImportES3/source.js",
    "content": "import { foo as bar } from \"foo\";\n\nexport { bar };\n"
  },
  {
    "path": "test/samples/exportNamedFunction/_config.js",
    "content": "module.exports = {\n\tdescription: 'named functions are exported early',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/exportNamedFunction/source.js",
    "content": "function foo() {}\nfunction bar() {}\nfunction baz() {}\n\nexport { foo, bar, baz };"
  },
  {
    "path": "test/samples/exportVar/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiles named inline variable exports',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/exportVar/source.js",
    "content": "export var foo = 'bar';\nfoo = 'baz';"
  },
  {
    "path": "test/samples/footer/_config.js",
    "content": "module.exports = {\n\tdescription: 'adds a footer',\n\tfooter: '\\n/* this is a footer */'\n};"
  },
  {
    "path": "test/samples/footer/source.js",
    "content": "import whatever from 'whatever';\n\nwhatever();\n\nexport default 'someExport';"
  },
  {
    "path": "test/samples/hasExportsVariable/_config.js",
    "content": "module.exports = {\n\tdescription: 'avoids conflict between exports and existing variables',\n\tstrict: true\n}"
  },
  {
    "path": "test/samples/hasExportsVariable/source.js",
    "content": "var exports = {};\nexports.foo = 'bar';\n\nexport default exports;"
  },
  {
    "path": "test/samples/importAll/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiles `import * as foo from \"foo\"`'\n};"
  },
  {
    "path": "test/samples/importAll/source.js",
    "content": "import * as fs from 'fs';\n"
  },
  {
    "path": "test/samples/importDefault/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiles default imports'\n};"
  },
  {
    "path": "test/samples/importDefault/source.js",
    "content": "import foo from 'foo';\n\nconsole.log( foo );\n"
  },
  {
    "path": "test/samples/importNamed/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiles named imports',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/importNamed/source.js",
    "content": "import { foo, bar } from 'baz';\n"
  },
  {
    "path": "test/samples/intermediateSourcemaps/_config.js",
    "content": "module.exports = {\n\tdescription: 'removes existing sourcemap comments'\n};\n"
  },
  {
    "path": "test/samples/intermediateSourcemaps/source.js",
    "content": "var answer = 42;\n//# sourceMappingURL=this/should/be/removed.js.map\n"
  },
  {
    "path": "test/samples/mixedImports/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiles mixed named/default imports',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/mixedImports/source.js",
    "content": "import asap, { later } from 'asap';\n"
  },
  {
    "path": "test/samples/multipleImports/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiles multiple imports'\n};"
  },
  {
    "path": "test/samples/multipleImports/source.js",
    "content": "import foo from 'foo';\nimport bar from 'bar';\nimport baz from 'baz';\n\nvar qux = foo( bar( baz ) );\nexport default qux;\n"
  },
  {
    "path": "test/samples/namedAmdModule/_config.js",
    "content": "module.exports = {\n\tdescription: 'creates a named AMD module if amdName is passed',\n\tamdName: 'myModule'\n};"
  },
  {
    "path": "test/samples/namedAmdModule/source.js",
    "content": "import foo from 'foo';\nfoo();"
  },
  {
    "path": "test/samples/preparsed/_config.js",
    "content": "module.exports = {\n\tdescription: 'uses existing AST',\n\tast: {\n\t\tstart: 0,\n\t\tbody: [{\n\t\t\tstart: 0,\n\t\t\tspecifiers: [{\n\t\t\t\tstart: 7,\n\t\t\t\tlocal: {\n\t\t\t\t\tstart: 7,\n\t\t\t\t\tname: 'foo',\n\t\t\t\t\ttype: 'Identifier',\n\t\t\t\t\tend: 10\n\t\t\t\t},\n\t\t\t\ttype: 'ImportDefaultSpecifier',\n\t\t\t\tend: 10\n\t\t\t}],\n\t\t\tsource: {\n\t\t\t\tstart: 16,\n\t\t\t\tvalue: './bar',   // this is different from the original source\n\t\t\t\traw: '\\'./bar\\'', // and should show up in the results...\n\t\t\t\ttype: 'Literal',\n\t\t\t\tend: 23\n\t\t\t},\n\t\t\ttype: 'ImportDeclaration',\n\t\t\tend: 24\n\t\t}],\n\t\tsourceType: 'module',\n\t\ttype: 'Program',\n\t\tend: 24\n\t}\n};"
  },
  {
    "path": "test/samples/preparsed/source.js",
    "content": "import foo from './foo';"
  },
  {
    "path": "test/samples/reExportES3/_config.js",
    "content": "module.exports = {\n\tdescription: 'safe re-export to default when using _evilES3SafeReExports',\n\tstrict: true,\n\t_evilES3SafeReExports: true\n};"
  },
  {
    "path": "test/samples/reExportES3/source.js",
    "content": "export { default } from 'foo';"
  },
  {
    "path": "test/samples/renamedExport/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiles renamed exports',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/renamedExport/source.js",
    "content": "var a = 42;\nexport { a as answer };"
  },
  {
    "path": "test/samples/renamedImport/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiles renamed imports',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/renamedImport/source.js",
    "content": "import { unlink as rm } from 'fs';\n"
  },
  {
    "path": "test/samples/safeCommentRemoval/_config.js",
    "content": "module.exports = {\n\tdescription: 'removes comments without blowing up',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/safeCommentRemoval/source.js",
    "content": "var foo = 42;\nexport { foo };\n//# sourceMappingURL=to/be/removed.js.map"
  },
  {
    "path": "test/samples/shadowedExport/_config.js",
    "content": "module.exports = {\n\tdescription: 'references to declarations shadowing exports are not treated as export references',\n\tstrict: true\n};\n"
  },
  {
    "path": "test/samples/shadowedExport/source.js",
    "content": "export function foo () { }\n\nfunction bar() {\n\tvar foo;\n\n\tfoo = \"qux\";\n}\n"
  },
  {
    "path": "test/samples/shadowedImport/_config.js",
    "content": "module.exports = {\n\tdescription: 'handles shadowed imports',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/shadowedImport/source.js",
    "content": "import { a } from 'foo';\n\na();\n(function () {\n\tvar foo = 'bar';\n\ta();\n}())"
  },
  {
    "path": "test/samples/sparseArray/_config.js",
    "content": "module.exports = {\n\tdescription: 'tree walker handles sparse arrays (#144)'\n};"
  },
  {
    "path": "test/samples/sparseArray/source.js",
    "content": "[1,,3,4]"
  },
  {
    "path": "test/samples/trailingEmptyImport/_config.js",
    "content": "module.exports = {\n\tdescription: 'transpiles trailing empty imports'\n};"
  },
  {
    "path": "test/samples/trailingEmptyImport/source.js",
    "content": "import foo from 'foo';\nimport 'polyfills';\n"
  },
  {
    "path": "test/samples/unscopedNameConflicts/_config.js",
    "content": "module.exports = {\n\tdescription: 'avoids conflict with unscoped names',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/unscopedNameConflicts/source.js",
    "content": "import { find } from './mod/path/location';\nfind();\nconsole.log(location.href);"
  },
  {
    "path": "test/samples/updateExportInArgument/_config.js",
    "content": "module.exports = {\n\tdescription: 'correctly wraps generated sequence expressions',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/updateExportInArgument/source.js",
    "content": "var a = 100;\n\nfunction decr () {\n\tconsole.log( '%d bottles of beer on the wall', --a );\n\tconsole.log( '%d bottles of beer', a-- );\n}\n\nexport { a as num, decr };"
  },
  {
    "path": "test/samples/updateExpressionInFunction/_config.js",
    "content": "module.exports = {\n\tdescription: 'correctly reassigns bindings via an update expression inside a function',\n\tstrict: true\n};"
  },
  {
    "path": "test/samples/updateExpressionInFunction/source.js",
    "content": "var a = 1;\n\nfunction incr () {\n\tvar b = a++;\n\tconsole.log( 'incremented from %s to %s', b, a );\n}\n\nexport { a as num, incr };"
  },
  {
    "path": "test/samples/useStrictFalse/_config.js",
    "content": "module.exports = {\n\tdescription: 'omits use strict if necessary',\n\tuseStrict: false\n};"
  },
  {
    "path": "test/samples/useStrictFalse/source.js",
    "content": "implicitGlobal = 'lol';"
  },
  {
    "path": "test/sourcemaps/bundle/foo.js",
    "content": "var message = 'yeah!';\nexport default message;"
  },
  {
    "path": "test/sourcemaps/bundle/main.js",
    "content": "import foo from './foo';\nconsole.log( foo );"
  },
  {
    "path": "test/sourcemaps/index.js",
    "content": "var path = require( 'path' );\nvar assert = require( 'assert' );\nvar SourceMapConsumer = require( 'source-map' ).SourceMapConsumer;\nvar esperanto = require( '../../' );\n\nvar Promise = require( 'sander' ).Promise;\n\nmodule.exports = function () {\n\treturn new Promise( function ( fulfil ) {\n\t\tvar start;\n\n\t\tdescribe( 'sourcemap', function () {\n\t\t\tthis.timeout( 20000 );\n\n\t\t\tbefore( function () {\n\t\t\t\tif ( process.env.BUILD_TIMEOUT ) {\n\t\t\t\t\tthis.timeout( parseInt( process.env.BUILD_TIMEOUT ) );\n\t\t\t\t}\n\n\t\t\t\tstart = Date.now();\n\t\t\t});\n\n\t\t\tafter( function () {\n\t\t\t\tfulfil( Date.now() - start );\n\t\t\t});\n\n\t\t\tdescribe( 'standalone', function () {\n\t\t\t\tvar sample, tests;\n\n\t\t\t\tsample = [\n\t\t\t\t\t'var answer = 42;',\n\t\t\t\t\t'console.log(\"the answer is %s\", answer);'\n\t\t\t\t].join( '\\n' );\n\n\t\t\t\ttests = [\n\t\t\t\t\t{ method: 'toAmd' },\n\t\t\t\t\t{ method: 'toCjs' },\n\t\t\t\t\t{ method: 'toUmd' }\n\t\t\t\t];\n\n\t\t\t\ttests.forEach( function ( t ) {\n\t\t\t\t\tit( 'is generated by ' + t.method, function () {\n\t\t\t\t\t\tvar result, charIndex, acc, generatedLoc, smc, lines, line, loc, i;\n\n\t\t\t\t\t\tresult = esperanto[ t.method ]( sample, {\n\t\t\t\t\t\t\tsourceMap: true,\n\t\t\t\t\t\t\tsourceMapFile: 'output.js',\n\t\t\t\t\t\t\tsourceMapSource: 'input.js',\n\t\t\t\t\t\t\tname: 'myModule'\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// find the location of 'console' in the generated code...\n\t\t\t\t\t\tcharIndex = result.code.indexOf( 'console' );\n\t\t\t\t\t\tacc = 0;\n\n\t\t\t\t\t\tlines = result.code.split( '\\n' );\n\t\t\t\t\t\tfor ( i = 0; i < lines.length; i += 1 ) {\n\t\t\t\t\t\t\tline = lines[i];\n\t\t\t\t\t\t\tif ( acc + line.length > charIndex ) {\n\t\t\t\t\t\t\t\tgeneratedLoc = {\n\t\t\t\t\t\t\t\t\tline: i + 1,\n\t\t\t\t\t\t\t\t\tcolumn: charIndex - acc\n\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tacc += line.length + 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// ...then ensure it corresponds to line 2 (one-based), column 0 (zero-based)\n\t\t\t\t\t\tsmc = new SourceMapConsumer( result.map );\n\t\t\t\t\t\tloc = smc.originalPositionFor( generatedLoc );\n\n\t\t\t\t\t\tassert.equal( loc.line, 2 );\n\t\t\t\t\t\tassert.equal( loc.column, 0 );\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\tit( 'accepts an absolute path for sourceMapFile', function () {\n\t\t\t\t\tvar result = esperanto.toAmd( sample, {\n\t\t\t\t\t\tsourceMap: true,\n\t\t\t\t\t\tsourceMapFile: '/path/to/output.js',\n\t\t\t\t\t\tsourceMapSource: 'input.js',\n\t\t\t\t\t\tname: 'myModule'\n\t\t\t\t\t});\n\n\t\t\t\t\tassert.ok( /sourceMappingURL=\\/path\\/to\\/output.js/.test( result.code ) );\n\t\t\t\t});\n\n\t\t\t\tit( 'does not require a sourceMapFile for `sourceMap: \"inline\"`', function() {\n\t\t\t\t\tvar result = esperanto.toAmd( sample, {\n\t\t\t\t\t\tsourceMap: 'inline',\n\t\t\t\t\t\tsourceMapSource: 'input.js',\n\t\t\t\t\t\tname: 'myModule'\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tdescribe( 'bundler', function () {\n\t\t\t\tit( 'should create sourcemap', function () {\n\t\t\t\t\treturn esperanto.bundle({\n\t\t\t\t\t\tbase: path.join( __dirname, 'bundle' ),\n\t\t\t\t\t\tentry: 'main'\n\t\t\t\t\t}).then( function ( bundle ) {\n\t\t\t\t\t\tvar converted, smc, loc;\n\n\t\t\t\t\t\tconverted = bundle.toCjs({\n\t\t\t\t\t\t\tsourceMap: true,\n\t\t\t\t\t\t\tsourceMapFile: path.join( __dirname, 'bundle.js' )\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tsmc = new SourceMapConsumer( converted.map );\n\n\t\t\t\t\t\tloc = smc.originalPositionFor({ line: 3, column: 14 });\n\n\t\t\t\t\t\tassert.equal( loc.line, 1 );\n\t\t\t\t\t\tassert.equal( loc.column, 14 );\n\t\t\t\t\t\tassert.equal( loc.source, 'bundle/foo.js' );\n\n\t\t\t\t\t\tloc = smc.originalPositionFor({ line: 6, column: 8 });\n\n\t\t\t\t\t\tassert.equal( loc.line, 2 );\n\t\t\t\t\t\tassert.equal( loc.column, 8 );\n\t\t\t\t\t\tassert.equal( loc.source, 'bundle/main.js' );\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t});\n};\n"
  },
  {
    "path": "test/strictMode/index.js",
    "content": "var path = require( 'path' );\nvar assert = require( 'assert' );\nvar sander = require( 'sander' );\nvar makeWhitespaceVisible = require( '../utils/makeWhitespaceVisible' );\nvar esperanto = require( '../../' );\n\nvar Promise = sander.Promise;\nglobal.assert = assert;\n\nmodule.exports = function () {\n\treturn new Promise( function ( fulfil ) {\n\t\tvar start;\n\n\t\tdescribe( 'strict mode', function () {\n\t\t\tthis.timeout( 20000 );\n\n\t\t\tvar tests = sander.readdirSync( __dirname, '../samples' ).map( function ( dir ) {\n\t\t\t\tvar config = require( '../samples/' + dir + '/_config' ),\n\t\t\t\t\tsource = sander.readFileSync( __dirname, '../samples', dir, 'source.js' ).toString();\n\n\t\t\t\tif ( config.ast ) {\n\t\t\t\t\tsource = {\n\t\t\t\t\t\tcode: source,\n\t\t\t\t\t\tast: config.ast\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tid: dir,\n\t\t\t\t\tconfig: config,\n\t\t\t\t\tsource: source\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tbefore( function () {\n\t\t\t\tif ( process.env.BUILD_TIMEOUT ) {\n\t\t\t\t\tthis.timeout( parseInt( process.env.BUILD_TIMEOUT ) );\n\t\t\t\t}\n\n\t\t\t\tsander.rimrafSync( 'es6-module-transpiler-tests/output' );\n\t\t\t\tstart = Date.now();\n\t\t\t});\n\n\t\t\tafter( function () {\n\t\t\t\tfulfil( Date.now() - start );\n\t\t\t});\n\n\t\t\tdescribe( 'esperanto.toAmd()', function () {\n\t\t\t\trunTests( 'amd', 'toAmd' );\n\t\t\t});\n\n\t\t\tdescribe( 'esperanto.toCjs()', function () {\n\t\t\t\trunTests( 'cjs', 'toCjs' );\n\t\t\t});\n\n\t\t\tdescribe( 'esperanto.toUmd()', function () {\n\t\t\t\trunTests( 'umd', 'toUmd' );\n\t\t\t});\n\n\t\t\tfunction runTests ( dir, method ) {\n\t\t\t\ttests.forEach( function ( t ) {\n\t\t\t\t\t( t.config.solo ? it.only : it )( t.config.description, function () {\n\t\t\t\t\t\tvar transpiled;\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\ttranspiled = esperanto[ method ]( t.source, {\n\t\t\t\t\t\t\t\tname: 'myModule',\n\t\t\t\t\t\t\t\tstrict: true,\n\t\t\t\t\t\t\t\tamdName: t.config.amdName,\n\t\t\t\t\t\t\t\tabsolutePaths: t.config.absolutePaths,\n\t\t\t\t\t\t\t\tbanner: t.config.banner,\n\t\t\t\t\t\t\t\tfooter: t.config.footer,\n\t\t\t\t\t\t\t\t_evilES3SafeReExports: t.config._evilES3SafeReExports,\n\t\t\t\t\t\t\t\tuseStrict: t.config.useStrict\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} catch ( err ) {\n\t\t\t\t\t\t\tif ( t.config.expectedError && ~err.message.indexOf( t.config.expectedError ) ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tthrow err;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( t.config.expectedError ) {\n\t\t\t\t\t\t\tthrow new Error( 'Expected error: ' + t.config.expectedError );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar actual = makeWhitespaceVisible( transpiled.code );\n\n\t\t\t\t\t\treturn sander.readFile( 'strictMode/output/' + dir, t.id + '.js' ).then( String ).then( function ( str ) {\n\t\t\t\t\t\t\tvar expected = makeWhitespaceVisible( str );\n\n\t\t\t\t\t\t\tassert.equal( actual, expected, 'Expected\\n>\\n' + actual + '\\n>\\n\\nto match\\n\\n>\\n' + expected + '\\n>' );\n\t\t\t\t\t\t}, function ( err ) {\n\t\t\t\t\t\t\tif ( err.code === 'ENOENT' ) {\n\t\t\t\t\t\t\t\tassert.equal( actual, '', 'Expected\\n>\\n' + actual + '\\n>\\n\\nto match non-existent file' );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthrow err;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tdescribe( 'ES6 module semantics tests from es6-module-transpiler:', function () {\n\t\t\t\tsander.readdirSync( __dirname, '../es6-module-transpiler-tests/input' ).forEach( function ( dir ) {\n\t\t\t\t\tvar config = require( '../es6-module-transpiler-tests/input/' + dir + '/_config' );\n\n\t\t\t\t\t( config.solo ? it.only : it )( dir, function () {\n\t\t\t\t\t\t// Create CommonJS modules, then require the entry module\n\t\t\t\t\t\treturn sander.readdir( 'es6-module-transpiler-tests/input', dir ).then( function ( files ) {\n\t\t\t\t\t\t\tvar promises = files.map( function ( file ) {\n\t\t\t\t\t\t\t\tif ( file === '_config.js' ) return;\n\n\t\t\t\t\t\t\t\treturn sander.readFile( 'es6-module-transpiler-tests/input', dir, file ).then( String ).then( function ( source ) {\n\t\t\t\t\t\t\t\t\tvar transpiled = esperanto.toCjs( source, {\n\t\t\t\t\t\t\t\t\t\tstrict: true\n\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\treturn sander.writeFile( 'es6-module-transpiler-tests/output', dir, file, transpiled.code );\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\treturn Promise.all( promises );\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.then( function () {\n\t\t\t\t\t\t\tvar missingError;\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\trequire( path.resolve( 'es6-module-transpiler-tests/output', dir, config.entry ) );\n\t\t\t\t\t\t\t\tif ( config.expectedError ) {\n\t\t\t\t\t\t\t\t\tmissingError = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} catch( err ) {\n\t\t\t\t\t\t\t\tif ( !config.expectedError || !~err.message.indexOf( config.expectedError ) ) {\n\t\t\t\t\t\t\t\t\tthrow err;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( missingError ) {\n\t\t\t\t\t\t\t\tthrow new Error( 'Expected error \"' + config.expectedError + '\"' );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.catch( function ( err ) {\n\t\t\t\t\t\t\tif ( !config.expectedError || !~err.message.indexOf( config.expectedError ) ) {\n\t\t\t\t\t\t\t\tthrow err;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t});\n\n};\n"
  },
  {
    "path": "test/strictMode/output/amd/absolutePaths.js",
    "content": "define('my/nested/module', ['foo', 'my/bar', 'my/nested/baz', 'my/qux'], function (foo, bar, baz, qux) {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/banner.js",
    "content": "/* this is a banner */\ndefine(['exports', 'whatever'], function (exports, whatever) {\n\n\t'use strict';\n\n\twhatever['default']();\n\n\texports['default'] = 'someExport';\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/bannerAndFooter.js",
    "content": "/* this is a banner */\ndefine(['exports', 'whatever'], function (exports, whatever) {\n\n\t'use strict';\n\n\twhatever['default']();\n\n\texports['default'] = 'someExport';\n\n});\n/* this is a footer */"
  },
  {
    "path": "test/strictMode/output/amd/clashingFunctionArguments.js",
    "content": "define(['exports', 'x/y/z'], function (exports, y__z) {\n\n\t'use strict';\n\n\texports.bar = bar;\n\n\tfunction bar ( z ) {\n\t\treturn y__z.foo( z );\n\t}\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/clashingMixedImports.js",
    "content": "define(['exports', 'duplicated', 'elsewhere'], function (exports, duplicated, elsewhere) {\n\n\t'use strict';\n\n\texports['default'] = function() {\n\t\treturn [duplicated.something, elsewhere['default']];\n\t}\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/clashingNames.js",
    "content": "define(['foo'], function (_foo) {\n\n\t'use strict';\n\n\tvar foo = 'should not clash';\n\n\t_foo.bar();\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/clashingObjectProperties.js",
    "content": "define(['./foo'], function (___foo) {\n\n\t'use strict';\n\n\tvar obj = {\n\t\tfoo: function foo () {}\n\t};\n\n\t___foo.foo();\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/conditionalExport.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\tvar foo = function () {};\n\tvar bar = 'a';\n\n\tif ( false ) {\n\t\tfoo = function () {\n\t\t\texports.bar = bar = 'b';\n\t\t};\n\t}\n\n\texports.foo = foo;\n\texports.bar = bar;\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/constructor.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\texports['default'] = function () {\n\t\tvar constructor;\n\t\tconstructor = 42;\n\t}\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/duplicateImportFalsePositive.js",
    "content": "define(['exports', 'bar'], function (exports, bar) {\n\n\t'use strict';\n\n\tObject.defineProperty(exports, 'foo', { enumerable: true, get: function () { return bar.foo; }});\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/duplicateImports.js",
    "content": "define(['foo'], function (foo) {\n\n\t'use strict';\n\n\tfoo.bar();\n\tfoo.baz();\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/earlyExport.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\texports['default'] = foo;\n\n\tfunction foo () {\n\t\tconsole.log( 'fooing' );\n\t}\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/emptyImport.js",
    "content": "define(['polyfills', 'foo'], function (__dep0__, bar) {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/emptyImportWithDefaultExport.js",
    "content": "define(['exports', 'foo', 'polyfills'], function (exports, foo) {\n\n\t'use strict';\n\n\texports['default'] = 'baz';\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/escapedSource.js",
    "content": "define(['fo\\no'], function (foo) {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/exportAnonFunction.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\texports['default'] = function () {\n\t\tconsole.log( 'I am anonymous' );\n\t}\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/exportClass.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\tclass Point {}\n\n\texports.Point = Point;\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/exportClassWithSuper.js",
    "content": "define(['bar'], function (Bar) {\n\n\t'use strict';\n\n\tclass Foo extends Bar['default'] {\n\t\tconstructor() {\n\t\t\tsuper();\n\t\t\tconsole.log('Foo constructed');\n\t\t}\n\t}\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/exportDefault.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\texports['default'] = 'foo';\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/exportFunction.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\tfunction foo ( str ) {\n\t\treturn str.toUpperCase();\n\t}\n\texports['default'] = foo;\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/exportInlineFunction.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\texports.foo = foo;\n\n\tfunction foo ( str ) {\n\t\treturn str.toUpperCase();\n\t}\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/exportLet.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\tlet answer = 41;\n\tanswer++;\n\n\texports.answer = answer;\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/exportNamed.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\tvar foo = 'bar', answer = 42;\n\n\texports.foo = foo;\n\texports.answer = answer;\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/exportNamedCollidesWithFunctionExpression.js",
    "content": "define('foo', ['exports'], function (exports) {\n\n\t'use strict';\n\n\tvar foo = \"bar\";\n\n\tif (false) {\n\t\tsomeFunction = function foo() {  };\n\t}\n\n\texports.foo = foo;\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/exportNamedFromNamedImportES3.js",
    "content": "define('foo', ['exports', 'foo'], function (exports, foo) {\n\n\t'use strict';\n\n\n\n\texports.bar = foo.foo;\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/exportNamedFunction.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\texports.foo = foo;\n\texports.bar = bar;\n\texports.baz = baz;\n\n\tfunction foo() {}\n\tfunction bar() {}\n\tfunction baz() {}\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/exportVar.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\tvar foo = 'bar';\n\tfoo = 'baz';\n\n\texports.foo = foo;\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/footer.js",
    "content": "define(['exports', 'whatever'], function (exports, whatever) {\n\n\t'use strict';\n\n\twhatever['default']();\n\n\texports['default'] = 'someExport';\n\n});\n/* this is a footer */"
  },
  {
    "path": "test/strictMode/output/amd/hasExportsVariable.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\tvar _exports = {};\n\t_exports.foo = 'bar';\n\n\texports['default'] = _exports;\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/importAll.js",
    "content": "define(['fs'], function (fs) {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/importDefault.js",
    "content": "define(['foo'], function (foo) {\n\n\t'use strict';\n\n\tconsole.log( foo['default'] );\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/importNamed.js",
    "content": "define(['baz'], function (baz) {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/intermediateSourcemaps.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\tvar answer = 42;\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/mixedImports.js",
    "content": "define(['asap'], function (asap) {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/multipleImports.js",
    "content": "define(['exports', 'foo', 'bar', 'baz'], function (exports, foo, bar, baz) {\n\n\t'use strict';\n\n\tvar qux = foo['default']( bar['default']( baz['default'] ) );\n\texports['default'] = qux;\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/namedAmdModule.js",
    "content": "define('myModule', ['foo'], function (foo) {\n\n\t'use strict';\n\n\tfoo['default']();\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/preparsed.js",
    "content": "define(['./bar'], function (foo) {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/reExportES3.js",
    "content": "define(['exports', 'foo'], function (exports, foo) {\n\n\t'use strict';\n\n\n\n\texports['default'] = foo['default'];\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/renamedExport.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\tvar a = 42;\n\n\texports.answer = a;\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/renamedImport.js",
    "content": "define(['fs'], function (fs) {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/safeCommentRemoval.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\tvar foo = 42;\n\n\texports.foo = foo;\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/shadowedExport.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\texports.foo = foo;\n\n\tfunction foo () { }\n\n\tfunction bar() {\n\t\tvar foo;\n\n\t\tfoo = \"qux\";\n\t}\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/shadowedImport.js",
    "content": "define(['foo'], function (_foo) {\n\n\t'use strict';\n\n\t_foo.a();\n\t(function () {\n\t\tvar foo = 'bar';\n\t\t_foo.a();\n\t}())\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/sparseArray.js",
    "content": "define(function () {\n\n\t'use strict';\n\n\t[1,,3,4]\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/trailingEmptyImport.js",
    "content": "define(['foo', 'polyfills'], function (foo) {\n\n\t'use strict';\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/unscopedNameConflicts.js",
    "content": "define(['./mod/path/location'], function (path__location) {\n\n\t'use strict';\n\n\tpath__location.find();\n\tconsole.log(location.href);\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/updateExportInArgument.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\texports.decr = decr;\n\n\tvar a = 100;\n\n\tfunction decr () {\n\t\tconsole.log( '%d bottles of beer on the wall', ( --a, exports.num = a ) );\n\t\tconsole.log( '%d bottles of beer', ( a--, exports.num = a, a + 1 ) );\n\t}\n\n\texports.num = a;\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/updateExpressionInFunction.js",
    "content": "define(['exports'], function (exports) {\n\n\t'use strict';\n\n\texports.incr = incr;\n\n\tvar a = 1;\n\n\tfunction incr () {\n\t\tvar b = a++; exports.num = a;\n\t\tconsole.log( 'incremented from %s to %s', b, a );\n\t}\n\n\texports.num = a;\n\n});"
  },
  {
    "path": "test/strictMode/output/amd/useStrictFalse.js",
    "content": "define(function () {\n\n\timplicitGlobal = 'lol';\n\n});"
  },
  {
    "path": "test/strictMode/output/cjs/absolutePaths.js",
    "content": "'use strict';\n\nvar foo = require('../../foo');\nvar bar = require('../bar');\nvar baz = require('./baz');\nvar qux = require('./../qux');"
  },
  {
    "path": "test/strictMode/output/cjs/banner.js",
    "content": "/* this is a banner */\n'use strict';\n\nvar whatever = require('whatever');\n\nwhatever['default']();\n\nexports['default'] = 'someExport';"
  },
  {
    "path": "test/strictMode/output/cjs/bannerAndFooter.js",
    "content": "/* this is a banner */\n'use strict';\n\nvar whatever = require('whatever');\n\nwhatever['default']();\n\nexports['default'] = 'someExport';\n/* this is a footer */"
  },
  {
    "path": "test/strictMode/output/cjs/clashingFunctionArguments.js",
    "content": "'use strict';\n\nexports.bar = bar;\n\nvar y__z = require('x/y/z');\n\nfunction bar ( z ) {\n\treturn y__z.foo( z );\n}"
  },
  {
    "path": "test/strictMode/output/cjs/clashingMixedImports.js",
    "content": "'use strict';\n\nvar duplicated = require('duplicated');\nvar elsewhere = require('elsewhere');\n\nexports['default'] = function() {\n\treturn [duplicated.something, elsewhere['default']];\n}"
  },
  {
    "path": "test/strictMode/output/cjs/clashingNames.js",
    "content": "'use strict';\n\nvar _foo = require('foo');\n\nvar foo = 'should not clash';\n\n_foo.bar();"
  },
  {
    "path": "test/strictMode/output/cjs/clashingObjectProperties.js",
    "content": "'use strict';\n\nvar ___foo = require('./foo');\n\nvar obj = {\n\tfoo: function foo () {}\n};\n\n___foo.foo();"
  },
  {
    "path": "test/strictMode/output/cjs/conditionalExport.js",
    "content": "'use strict';\n\nvar foo = function () {};\nvar bar = 'a';\n\nif ( false ) {\n\tfoo = function () {\n\t\texports.bar = bar = 'b';\n\t};\n}\n\nexports.foo = foo;\nexports.bar = bar;"
  },
  {
    "path": "test/strictMode/output/cjs/constructor.js",
    "content": "'use strict';\n\nexports['default'] = function () {\n\tvar constructor;\n\tconstructor = 42;\n}"
  },
  {
    "path": "test/strictMode/output/cjs/duplicateImportFalsePositive.js",
    "content": "'use strict';\n\nObject.defineProperty(exports, 'foo', { enumerable: true, get: function () { return bar.foo; }});\n\nvar bar = require('bar');"
  },
  {
    "path": "test/strictMode/output/cjs/duplicateImports.js",
    "content": "'use strict';\n\nvar foo = require('foo');\n\nfoo.bar();\nfoo.baz();"
  },
  {
    "path": "test/strictMode/output/cjs/earlyExport.js",
    "content": "'use strict';\n\nexports['default'] = foo;\n\nfunction foo () {\n\tconsole.log( 'fooing' );\n}"
  },
  {
    "path": "test/strictMode/output/cjs/emptyImport.js",
    "content": "'use strict';\n\nrequire('polyfills');\nvar bar = require('foo');"
  },
  {
    "path": "test/strictMode/output/cjs/emptyImportWithDefaultExport.js",
    "content": "'use strict';\n\nvar foo = require('foo');\nrequire('polyfills');\n\nexports['default'] = 'baz';"
  },
  {
    "path": "test/strictMode/output/cjs/escapedSource.js",
    "content": "'use strict';\n\nvar foo = require('fo\\no');"
  },
  {
    "path": "test/strictMode/output/cjs/exportAnonFunction.js",
    "content": "'use strict';\n\nexports['default'] = function () {\n\tconsole.log( 'I am anonymous' );\n}"
  },
  {
    "path": "test/strictMode/output/cjs/exportClass.js",
    "content": "'use strict';\n\nclass Point {}\n\nexports.Point = Point;"
  },
  {
    "path": "test/strictMode/output/cjs/exportClassWithSuper.js",
    "content": "'use strict';\n\nvar Bar = require('bar');\n\nclass Foo extends Bar['default'] {\n\tconstructor() {\n\t\tsuper();\n\t\tconsole.log('Foo constructed');\n\t}\n}"
  },
  {
    "path": "test/strictMode/output/cjs/exportDefault.js",
    "content": "'use strict';\n\nexports['default'] = 'foo';"
  },
  {
    "path": "test/strictMode/output/cjs/exportFunction.js",
    "content": "'use strict';\n\nfunction foo ( str ) {\n\treturn str.toUpperCase();\n}\nexports['default'] = foo;"
  },
  {
    "path": "test/strictMode/output/cjs/exportInlineFunction.js",
    "content": "'use strict';\n\nexports.foo = foo;\n\nfunction foo ( str ) {\n\treturn str.toUpperCase();\n}"
  },
  {
    "path": "test/strictMode/output/cjs/exportLet.js",
    "content": "'use strict';\n\nlet answer = 41;\nanswer++;\n\nexports.answer = answer;"
  },
  {
    "path": "test/strictMode/output/cjs/exportNamed.js",
    "content": "'use strict';\n\nvar foo = 'bar', answer = 42;\n\nexports.foo = foo;\nexports.answer = answer;"
  },
  {
    "path": "test/strictMode/output/cjs/exportNamedCollidesWithFunctionExpression.js",
    "content": "'use strict';\n\nvar foo = \"bar\";\n\nif (false) {\n\tsomeFunction = function foo() {  };\n}\n\nexports.foo = foo;"
  },
  {
    "path": "test/strictMode/output/cjs/exportNamedFromNamedImportES3.js",
    "content": "'use strict';\n\nvar foo = require('foo');\n\nexports.bar = foo.foo;"
  },
  {
    "path": "test/strictMode/output/cjs/exportNamedFunction.js",
    "content": "'use strict';\n\nexports.foo = foo;\nexports.bar = bar;\nexports.baz = baz;\n\nfunction foo() {}\nfunction bar() {}\nfunction baz() {}"
  },
  {
    "path": "test/strictMode/output/cjs/exportVar.js",
    "content": "'use strict';\n\nvar foo = 'bar';\nfoo = 'baz';\n\nexports.foo = foo;"
  },
  {
    "path": "test/strictMode/output/cjs/footer.js",
    "content": "'use strict';\n\nvar whatever = require('whatever');\n\nwhatever['default']();\n\nexports['default'] = 'someExport';\n/* this is a footer */"
  },
  {
    "path": "test/strictMode/output/cjs/hasExportsVariable.js",
    "content": "'use strict';\n\nvar _exports = {};\n_exports.foo = 'bar';\n\nexports['default'] = _exports;"
  },
  {
    "path": "test/strictMode/output/cjs/importAll.js",
    "content": "'use strict';\n\nvar fs = require('fs');"
  },
  {
    "path": "test/strictMode/output/cjs/importDefault.js",
    "content": "'use strict';\n\nvar foo = require('foo');\n\nconsole.log( foo['default'] );"
  },
  {
    "path": "test/strictMode/output/cjs/importNamed.js",
    "content": "'use strict';\n\nvar baz = require('baz');"
  },
  {
    "path": "test/strictMode/output/cjs/intermediateSourcemaps.js",
    "content": "'use strict';\n\nvar answer = 42;"
  },
  {
    "path": "test/strictMode/output/cjs/mixedImports.js",
    "content": "'use strict';\n\nvar asap = require('asap');"
  },
  {
    "path": "test/strictMode/output/cjs/multipleImports.js",
    "content": "'use strict';\n\nvar foo = require('foo');\nvar bar = require('bar');\nvar baz = require('baz');\n\nvar qux = foo['default']( bar['default']( baz['default'] ) );\nexports['default'] = qux;"
  },
  {
    "path": "test/strictMode/output/cjs/namedAmdModule.js",
    "content": "'use strict';\n\nvar foo = require('foo');\n\nfoo['default']();"
  },
  {
    "path": "test/strictMode/output/cjs/preparsed.js",
    "content": "'use strict';\n\nvar foo = require('./bar');"
  },
  {
    "path": "test/strictMode/output/cjs/reExportES3.js",
    "content": "'use strict';\n\nvar foo = require('foo');\n\nexports['default'] = foo['default'];"
  },
  {
    "path": "test/strictMode/output/cjs/renamedExport.js",
    "content": "'use strict';\n\nvar a = 42;\n\nexports.answer = a;"
  },
  {
    "path": "test/strictMode/output/cjs/renamedImport.js",
    "content": "'use strict';\n\nvar fs = require('fs');"
  },
  {
    "path": "test/strictMode/output/cjs/safeCommentRemoval.js",
    "content": "'use strict';\n\nvar foo = 42;\n\nexports.foo = foo;"
  },
  {
    "path": "test/strictMode/output/cjs/shadowedExport.js",
    "content": "'use strict';\n\nexports.foo = foo;\n\nfunction foo () { }\n\nfunction bar() {\n\tvar foo;\n\n\tfoo = \"qux\";\n}"
  },
  {
    "path": "test/strictMode/output/cjs/shadowedImport.js",
    "content": "'use strict';\n\nvar _foo = require('foo');\n\n_foo.a();\n(function () {\n\tvar foo = 'bar';\n\t_foo.a();\n}())"
  },
  {
    "path": "test/strictMode/output/cjs/sparseArray.js",
    "content": "'use strict';\n\n[1,,3,4]"
  },
  {
    "path": "test/strictMode/output/cjs/trailingEmptyImport.js",
    "content": "'use strict';\n\nvar foo = require('foo');\nrequire('polyfills');"
  },
  {
    "path": "test/strictMode/output/cjs/unscopedNameConflicts.js",
    "content": "'use strict';\n\nvar path__location = require('./mod/path/location');\n\npath__location.find();\nconsole.log(location.href);"
  },
  {
    "path": "test/strictMode/output/cjs/updateExportInArgument.js",
    "content": "'use strict';\n\nexports.decr = decr;\n\nvar a = 100;\n\nfunction decr () {\n\tconsole.log( '%d bottles of beer on the wall', ( --a, exports.num = a ) );\n\tconsole.log( '%d bottles of beer', ( a--, exports.num = a, a + 1 ) );\n}\n\nexports.num = a;"
  },
  {
    "path": "test/strictMode/output/cjs/updateExpressionInFunction.js",
    "content": "'use strict';\n\nexports.incr = incr;\n\nvar a = 1;\n\nfunction incr () {\n\tvar b = a++; exports.num = a;\n\tconsole.log( 'incremented from %s to %s', b, a );\n}\n\nexports.num = a;"
  },
  {
    "path": "test/strictMode/output/cjs/useStrictFalse.js",
    "content": "implicitGlobal = 'lol';"
  },
  {
    "path": "test/strictMode/output/umd/absolutePaths.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../../foo'), require('../bar'), require('./baz'), require('./../qux')) :\n\ttypeof define === 'function' && define.amd ? define('my/nested/module', ['foo', 'my/bar', 'my/nested/baz', 'my/qux'], factory) :\n\tfactory(global.foo, global.bar, global.baz, global.qux)\n}(this, function (foo, bar, baz, qux) { 'use strict';\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/banner.js",
    "content": "/* this is a banner */\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('whatever')) :\n\ttypeof define === 'function' && define.amd ? define(['exports', 'whatever'], factory) :\n\tfactory((global.myModule = {}), global.whatever)\n}(this, function (exports, whatever) { 'use strict';\n\n\twhatever['default']();\n\n\texports['default'] = 'someExport';\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/bannerAndFooter.js",
    "content": "/* this is a banner */\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('whatever')) :\n\ttypeof define === 'function' && define.amd ? define(['exports', 'whatever'], factory) :\n\tfactory((global.myModule = {}), global.whatever)\n}(this, function (exports, whatever) { 'use strict';\n\n\twhatever['default']();\n\n\texports['default'] = 'someExport';\n\n}));\n/* this is a footer */"
  },
  {
    "path": "test/strictMode/output/umd/clashingFunctionArguments.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('x/y/z')) :\n\ttypeof define === 'function' && define.amd ? define(['exports', 'x/y/z'], factory) :\n\tfactory((global.myModule = {}), global.y__z)\n}(this, function (exports, y__z) { 'use strict';\n\n\texports.bar = bar;\n\n\tfunction bar ( z ) {\n\t\treturn y__z.foo( z );\n\t}\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/clashingMixedImports.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('duplicated'), require('elsewhere')) :\n\ttypeof define === 'function' && define.amd ? define(['exports', 'duplicated', 'elsewhere'], factory) :\n\tfactory((global.myModule = {}), global.duplicated, global.elsewhere)\n}(this, function (exports, duplicated, elsewhere) { 'use strict';\n\n\texports['default'] = function() {\n\t\treturn [duplicated.something, elsewhere['default']];\n\t}\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/clashingNames.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('foo')) :\n\ttypeof define === 'function' && define.amd ? define(['foo'], factory) :\n\tfactory(global._foo)\n}(this, function (_foo) { 'use strict';\n\n\tvar foo = 'should not clash';\n\n\t_foo.bar();\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/clashingObjectProperties.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('./foo')) :\n\ttypeof define === 'function' && define.amd ? define(['./foo'], factory) :\n\tfactory(global.___foo)\n}(this, function (___foo) { 'use strict';\n\n\tvar obj = {\n\t\tfoo: function foo () {}\n\t};\n\n\t___foo.foo();\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/conditionalExport.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tvar foo = function () {};\n\tvar bar = 'a';\n\n\tif ( false ) {\n\t\tfoo = function () {\n\t\t\texports.bar = bar = 'b';\n\t\t};\n\t}\n\n\texports.foo = foo;\n\texports.bar = bar;\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/constructor.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\texports['default'] = function () {\n\t\tvar constructor;\n\t\tconstructor = 42;\n\t}\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/duplicateImportFalsePositive.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('bar')) :\n\ttypeof define === 'function' && define.amd ? define(['exports', 'bar'], factory) :\n\tfactory((global.myModule = {}), global.bar)\n}(this, function (exports, bar) { 'use strict';\n\n\tObject.defineProperty(exports, 'foo', { enumerable: true, get: function () { return bar.foo; }});\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/duplicateImports.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('foo')) :\n\ttypeof define === 'function' && define.amd ? define(['foo'], factory) :\n\tfactory(global.foo)\n}(this, function (foo) { 'use strict';\n\n\tfoo.bar();\n\tfoo.baz();\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/earlyExport.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\texports['default'] = foo;\n\n\tfunction foo () {\n\t\tconsole.log( 'fooing' );\n\t}\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/emptyImport.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('polyfills'), require('foo')) :\n\ttypeof define === 'function' && define.amd ? define(['polyfills', 'foo'], factory) :\n\tfactory(undefined, global.bar)\n}(this, function (__dep0__, bar) { 'use strict';\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/emptyImportWithDefaultExport.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('foo'), require('polyfills')) :\n\ttypeof define === 'function' && define.amd ? define(['exports', 'foo', 'polyfills'], factory) :\n\tfactory((global.myModule = {}), global.foo)\n}(this, function (exports, foo) { 'use strict';\n\n\texports['default'] = 'baz';\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/escapedSource.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('fo\\no')) :\n\ttypeof define === 'function' && define.amd ? define(['fo\\no'], factory) :\n\tfactory(global.foo)\n}(this, function (foo) { 'use strict';\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/exportAnonFunction.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\texports['default'] = function () {\n\t\tconsole.log( 'I am anonymous' );\n\t}\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/exportClass.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tclass Point {}\n\n\texports.Point = Point;\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/exportClassWithSuper.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('bar')) :\n\ttypeof define === 'function' && define.amd ? define(['bar'], factory) :\n\tfactory(global.Bar)\n}(this, function (Bar) { 'use strict';\n\n\tclass Foo extends Bar['default'] {\n\t\tconstructor() {\n\t\t\tsuper();\n\t\t\tconsole.log('Foo constructed');\n\t\t}\n\t}\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/exportDefault.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\texports['default'] = 'foo';\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/exportFunction.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tfunction foo ( str ) {\n\t\treturn str.toUpperCase();\n\t}\n\texports['default'] = foo;\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/exportInlineFunction.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\texports.foo = foo;\n\n\tfunction foo ( str ) {\n\t\treturn str.toUpperCase();\n\t}\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/exportLet.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tlet answer = 41;\n\tanswer++;\n\n\texports.answer = answer;\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/exportNamed.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tvar foo = 'bar', answer = 42;\n\n\texports.foo = foo;\n\texports.answer = answer;\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/exportNamedCollidesWithFunctionExpression.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define('foo', ['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tvar foo = \"bar\";\n\n\tif (false) {\n\t\tsomeFunction = function foo() {  };\n\t}\n\n\texports.foo = foo;\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/exportNamedFromNamedImportES3.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('foo')) :\n\ttypeof define === 'function' && define.amd ? define('foo', ['exports', 'foo'], factory) :\n\tfactory((global.myModule = {}), global.foo)\n}(this, function (exports, foo) { 'use strict';\n\n\n\n\texports.bar = foo.foo;\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/exportNamedFunction.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\texports.foo = foo;\n\texports.bar = bar;\n\texports.baz = baz;\n\n\tfunction foo() {}\n\tfunction bar() {}\n\tfunction baz() {}\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/exportVar.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tvar foo = 'bar';\n\tfoo = 'baz';\n\n\texports.foo = foo;\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/footer.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('whatever')) :\n\ttypeof define === 'function' && define.amd ? define(['exports', 'whatever'], factory) :\n\tfactory((global.myModule = {}), global.whatever)\n}(this, function (exports, whatever) { 'use strict';\n\n\twhatever['default']();\n\n\texports['default'] = 'someExport';\n\n}));\n/* this is a footer */"
  },
  {
    "path": "test/strictMode/output/umd/hasExportsVariable.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tvar _exports = {};\n\t_exports.foo = 'bar';\n\n\texports['default'] = _exports;\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/importAll.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('fs')) :\n\ttypeof define === 'function' && define.amd ? define(['fs'], factory) :\n\tfactory(global.fs)\n}(this, function (fs) { 'use strict';\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/importDefault.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('foo')) :\n\ttypeof define === 'function' && define.amd ? define(['foo'], factory) :\n\tfactory(global.foo)\n}(this, function (foo) { 'use strict';\n\n\tconsole.log( foo['default'] );\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/importNamed.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('baz')) :\n\ttypeof define === 'function' && define.amd ? define(['baz'], factory) :\n\tfactory(global.baz)\n}(this, function (baz) { 'use strict';\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/intermediateSourcemaps.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\tvar answer = 42;\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/mixedImports.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('asap')) :\n\ttypeof define === 'function' && define.amd ? define(['asap'], factory) :\n\tfactory(global.asap)\n}(this, function (asap) { 'use strict';\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/multipleImports.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('foo'), require('bar'), require('baz')) :\n\ttypeof define === 'function' && define.amd ? define(['exports', 'foo', 'bar', 'baz'], factory) :\n\tfactory((global.myModule = {}), global.foo, global.bar, global.baz)\n}(this, function (exports, foo, bar, baz) { 'use strict';\n\n\tvar qux = foo['default']( bar['default']( baz['default'] ) );\n\texports['default'] = qux;\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/namedAmdModule.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('foo')) :\n\ttypeof define === 'function' && define.amd ? define('myModule', ['foo'], factory) :\n\tfactory(global.foo)\n}(this, function (foo) { 'use strict';\n\n\tfoo['default']();\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/preparsed.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('./bar')) :\n\ttypeof define === 'function' && define.amd ? define(['./bar'], factory) :\n\tfactory(global.foo)\n}(this, function (foo) { 'use strict';\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/reExportES3.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('foo')) :\n\ttypeof define === 'function' && define.amd ? define(['exports', 'foo'], factory) :\n\tfactory((global.myModule = {}), global.foo)\n}(this, function (exports, foo) { 'use strict';\n\n\n\n\texports['default'] = foo['default'];\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/renamedExport.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tvar a = 42;\n\n\texports.answer = a;\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/renamedImport.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('fs')) :\n\ttypeof define === 'function' && define.amd ? define(['fs'], factory) :\n\tfactory(global.fs)\n}(this, function (fs) { 'use strict';\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/safeCommentRemoval.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\tvar foo = 42;\n\n\texports.foo = foo;\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/shadowedExport.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\texports.foo = foo;\n\n\tfunction foo () { }\n\n\tfunction bar() {\n\t\tvar foo;\n\n\t\tfoo = \"qux\";\n\t}\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/shadowedImport.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('foo')) :\n\ttypeof define === 'function' && define.amd ? define(['foo'], factory) :\n\tfactory(global._foo)\n}(this, function (_foo) { 'use strict';\n\n\t_foo.a();\n\t(function () {\n\t\tvar foo = 'bar';\n\t\t_foo.a();\n\t}())\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/sparseArray.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () { 'use strict';\n\n\t[1,,3,4]\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/trailingEmptyImport.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('foo'), require('polyfills')) :\n\ttypeof define === 'function' && define.amd ? define(['foo', 'polyfills'], factory) :\n\tfactory(global.foo)\n}(this, function (foo) { 'use strict';\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/unscopedNameConflicts.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(require('./mod/path/location')) :\n\ttypeof define === 'function' && define.amd ? define(['./mod/path/location'], factory) :\n\tfactory(global.path__location)\n}(this, function (path__location) { 'use strict';\n\n\tpath__location.find();\n\tconsole.log(location.href);\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/updateExportInArgument.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\texports.decr = decr;\n\n\tvar a = 100;\n\n\tfunction decr () {\n\t\tconsole.log( '%d bottles of beer on the wall', ( --a, exports.num = a ) );\n\t\tconsole.log( '%d bottles of beer', ( a--, exports.num = a, a + 1 ) );\n\t}\n\n\texports.num = a;\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/updateExpressionInFunction.js",
    "content": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\tfactory((global.myModule = {}))\n}(this, function (exports) { 'use strict';\n\n\texports.incr = incr;\n\n\tvar a = 1;\n\n\tfunction incr () {\n\t\tvar b = a++; exports.num = a;\n\t\tconsole.log( 'incremented from %s to %s', b, a );\n\t}\n\n\texports.num = a;\n\n}));"
  },
  {
    "path": "test/strictMode/output/umd/useStrictFalse.js",
    "content": "(function (factory) {\n\t!(typeof exports === 'object' && typeof module !== 'undefined') &&\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\tfactory()\n}(function () {\n\n\timplicitGlobal = 'lol';\n\n}));"
  },
  {
    "path": "test/test.js",
    "content": "require( 'source-map-support' ).install();\n\nprocess.chdir( __dirname );\n\nvar testModules = [\n\t'fastMode',\n\t'strictMode',\n\t'bundle',\n\t'sourcemaps'\n];\n\nvar results = testModules.map( function ( mod ) {\n\treturn require( './' + mod )();\n});\n\nrequire( 'sander' ).Promise.all( results ).then( function ( completionTimes ) {\n\ttestModules.forEach( function ( mod, i ) {\n\t\tconsole.log( 'completed %s in %sms', mod, completionTimes[i] );\n\t});\n});"
  },
  {
    "path": "test/utils/generate.js",
    "content": "var path = require( 'path' );\nvar sander = require( 'sander' );\nvar esperanto = require( '../../' );\n\nvar Promise = sander.Promise;\n\nprocess.chdir( __dirname );\n\n\ngenerateFastModeOutput();\ngenerateStrictModeOutput();\ngenerateBundleOutput();\n\nfunction generateFastModeOutput () {\n\tvar profiles = [\n\t\t{ outputdir: 'amd', method: 'toAmd' },\n\t\t{ outputdir: 'cjs', method: 'toCjs' },\n\t\t{ outputdir: 'umd', method: 'toUmd', options: { name: 'myModule' } }\n\t];\n\n\treturn cleanup().then( buildAll ).catch( function ( err ) {\n\t\tconsole.log( 'err', err );\n\t});\n\n\tfunction cleanup () {\n\t\treturn sander.rimraf( '../fastMode/output' );\n\t}\n\n\tfunction buildAll () {\n\t\treturn sander.readdir( '../samples' ).then( function ( samples ) {\n\t\t\treturn Promise.all( samples.map( build ) );\n\t\t});\n\t}\n\n\tfunction build ( sample ) {\n\t\treturn sander.readFile( '../samples', sample, 'source.js' ).then( String ).then( function ( source ) {\n\t\t\tvar config = require( '../samples/' + sample + '/_config' ),\n\t\t\t\tpromises;\n\n\t\t\tif ( config.strict ) return;\n\n\t\t\tif ( config.ast ) {\n\t\t\t\tsource = {\n\t\t\t\t\tcode: source,\n\t\t\t\t\tast: config.ast\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tpromises = profiles.map( function ( profile ) {\n\t\t\t\tvar transpiled = esperanto[ profile.method ]( source, {\n\t\t\t\t\tname: profile.options && profile.options.name,\n\t\t\t\t\tamdName: config.amdName,\n\t\t\t\t\tabsolutePaths: config.absolutePaths,\n\t\t\t\t\tstrict: profile.options && profile.options.strict,\n\t\t\t\t\tbanner: config.banner,\n\t\t\t\t\tfooter: config.footer,\n\t\t\t\t\tuseStrict: config.useStrict\n\t\t\t\t});\n\t\t\t\treturn sander.writeFile( '../fastMode/output', profile.outputdir, sample + '.js', transpiled.code );\n\t\t\t});\n\n\t\t\treturn Promise.all( promises );\n\t\t});\n\t}\n}\n\nfunction generateStrictModeOutput () {\n\tvar profiles = [\n\t\t{ outputdir: 'amd', method: 'toAmd', options: { strict: true } },\n\t\t{ outputdir: 'cjs', method: 'toCjs', options: { strict: true } },\n\t\t{ outputdir: 'umd', method: 'toUmd', options: { strict: true, name: 'myModule' } }\n\t];\n\n\treturn cleanup().then( buildAll ).catch( function ( err ) {\n\t\tconsole.log( 'err', err );\n\t});\n\n\tfunction cleanup () {\n\t\treturn sander.rimraf( '../strictMode/output' );\n\t}\n\n\tfunction buildAll () {\n\t\treturn sander.readdir( '../samples' ).then( function ( samples ) {\n\t\t\treturn Promise.all( samples.map( build ) );\n\t\t});\n\t}\n\n\tfunction build ( sample ) {\n\t\treturn sander.readFile( '../samples', sample, 'source.js' ).then( String ).then( function ( source ) {\n\t\t\tvar config = require( '../samples/' + sample + '/_config' ),\n\t\t\t\tpromises;\n\n\t\t\tif ( config.ast ) {\n\t\t\t\tsource = {\n\t\t\t\t\tcode: source,\n\t\t\t\t\tast: config.ast\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tpromises = profiles.map( function ( profile ) {\n\t\t\t\tvar transpiled = esperanto[ profile.method ]( source, {\n\t\t\t\t\tname: profile.options && profile.options.name,\n\t\t\t\t\tamdName: config.amdName,\n\t\t\t\t\tabsolutePaths: config.absolutePaths,\n\t\t\t\t\tstrict: profile.options && profile.options.strict,\n\t\t\t\t\tbanner: config.banner,\n\t\t\t\t\tfooter: config.footer,\n\t\t\t\t\t_evilES3SafeReExports: config._evilES3SafeReExports,\n\t\t\t\t\tuseStrict: config.useStrict\n\t\t\t\t});\n\t\t\t\treturn sander.writeFile( '../strictMode/output', profile.outputdir, sample + '.js', transpiled.code );\n\t\t\t});\n\n\t\t\treturn Promise.all( promises );\n\t\t});\n\t}\n}\n\nfunction generateBundleOutput () {\n\tvar profiles = [\n\t\t{ description: 'bundle.concat()', method: 'concat', outputdir: 'concat' },\n\t\t{ description: 'bundle.toAmd()', method: 'toAmd', outputdir: 'amdDefaults' },\n\t\t{ description: 'bundle.toCjs()', method: 'toCjs', outputdir: 'cjsDefaults' },\n\t\t{ description: 'bundle.toUmd()', method: 'toUmd', outputdir: 'umdDefaults', options: { name: 'myModule' } },\n\t\t{ description: 'bundle.toAmd({ strict: true })', method: 'toAmd', outputdir: 'amd', options: { strict: true } },\n\t\t{ description: 'bundle.toCjs({ strict: true })', method: 'toCjs', outputdir: 'cjs', options: { strict: true } },\n\t\t{ description: 'bundle.toUmd({ strict: true })', method: 'toUmd', outputdir: 'umd', options: { strict: true, name: 'myModule' } }\n\t];\n\n\treturn cleanup().then( buildAll ).catch( function ( err ) {\n\t\tconsole.log( 'err', err );\n\t});\n\n\tfunction cleanup () {\n\t\treturn sander.rimraf( '../bundle/output' );\n\t}\n\n\tfunction buildAll () {\n\t\treturn sander.readdir( '../bundle/input' ).then( function ( sourceBundles ) {\n\t\t\treturn Promise.all( sourceBundles.map( build ) );\n\t\t});\n\t}\n\n\tfunction build ( sourceBundle ) {\n\t\tvar config;\n\n\t\tif ( /DS_Store/.test( sourceBundle ) ) return;\n\n\t\tconfig = require( '../bundle/input/' + sourceBundle + '/_config' );\n\n\t\tvar promises = profiles.map( function ( profile ) {\n\t\t\treturn esperanto.bundle({\n\t\t\t\tbase: path.join( '../bundle/input', sourceBundle ),\n\t\t\t\tentry: 'main',\n\t\t\t\tskip: config.skip,\n\t\t\t\tnames: config.names,\n\t\t\t\ttransform: config.transform,\n\t\t\t\tresolvePath: config.resolvePath,\n\t\t\t\tmodules: config.modules\n\t\t\t}).then( function ( bundle ) {\n\t\t\t\ttry {\n\t\t\t\t\tvar transpiled = bundle[ profile.method ]({\n\t\t\t\t\t\tstrict: profile.options && profile.options.strict,\n\t\t\t\t\t\tname: profile.options && profile.options.name,\n\t\t\t\t\t\tamdName: config.amdName,\n\t\t\t\t\t\tbanner: config.banner,\n\t\t\t\t\t\tfooter: config.footer,\n\t\t\t\t\t\tuseStrict: config.useStrict,\n\t\t\t\t\t\tsourceMap: config.sourceMap\n\t\t\t\t\t});\n\n\t\t\t\t\t// necessary for CI\n\t\t\t\t\tif ( config.sourceMap ) {\n\t\t\t\t\t\ttranspiled.code = transpiled.code.replace( /base64,.+/, 'base64,xyz' );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn sander.writeFile( '../bundle/output', profile.outputdir, sourceBundle + '.js', transpiled.code );\n\t\t\t\t} catch ( err ) {\n\t\t\t\t\t// some modules can't be transpiled with defaultOnly\n\t\t\t\t\tif ( !/strict mode/.test( err.message ) && !/bundles that have no imports/.test( err.message ) ) {\n\t\t\t\t\t\tsetTimeout( function () { throw err; });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\treturn Promise.all( promises );\n\t}\n}\n"
  },
  {
    "path": "test/utils/makeWhitespaceVisible.js",
    "content": "module.exports = function makeWhitespaceVisible ( str ) {\n\treturn str.replace( /\\r?\\n/g, '¶\\n' ).replace( /^\\t+/gm, function ( match ) {\n\t\t// replace leading tabs\n\t\treturn match.replace( /\\t/g, '--->' );\n\t}).replace( /^( +)/gm, function ( match, $1 ) {\n\t\t// replace leading spaces\n\t\treturn $1.replace( / /g, '*' );\n\t}).replace( /\\t+$/gm, function ( match ) {\n\t\t// replace trailing tabs\n\t\treturn match.replace( /\\t/g, '--->' );\n\t}).replace( /( +)$/gm, function ( match, $1 ) {\n\t\t// replace trailing spaces\n\t\treturn $1.replace( / /g, '*' );\n\t});\n};\n"
  }
]