Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'loaders' option, as less-magical altenative to 'require' option. C…
…loses GH-8 The 'require' option allowed passing the require() function, which would be pre-populated with require('pluginame') in the calling module so browserify could statically analyze the module dependencies. This was somewhat confusing since calling require() when ignoring the return value has non-obvious side-effects (browserify static analysis): require('voxel-skyhook'); pluginOpts = { 'voxel-skyhook': {}, ... } The new 'loaders' option to voxel-plugins is more explicit: loaders = { 'voxel-skyhook': require('voxel-skyhook'), ... }, where the specific require()'d modules are passed in as object values. This is somewhat more typing, but is clearer and easier to follow. The old require option is still supported for compatibility, but 'loaders' is preferred for clarity.
- Loading branch information