Package Resolver
This resolver is intended to work with the ES6 Module Transpiler to provide file resolution for projects written using the "package" style, e.g.
packages/
utils/
lib/
string.js
main.js
app/
lib/
main.js
Given this package structure and the "packages" directory as a root, "utils/string" would be resolved to "utils/lib/string.js", "app" would be resolved to "app/lib/main.js", etc. This project format is used by Ember.js.
Install
$ npm install [--save-dev] es6-module-transpiler-package-resolver
Usage
When used directly with the ES6 Module Transpiler, just use it the same way you would FileResolver
but give it all
your "packages" directories:
var PackageResolver = ;var Container = Container;var BundleFormatter = formattersbundle; var container = formatter: resolvers: './packages';
You can also use it with tools like Broccoli via plugins such as broccoli-compile-modules:
// Brocfile.js var PackageResolver = ;var compileModules = ; moduleexports = ;
Contributing
- Fork this project.
- Create a branch for your bug fix or feature.
- Commit to that branch, ensuring you update and add tests as appropriate.
- Submit a pull request with a description of the bug or feature, links to any relevant resources, etc.
Thanks!