Re: Loader Hooks

2014-07-02 Thread Calvin Metcalf
Another helpful place for a hook might be an executeDependencies type thing, currently the list of dependencies returned by instantiate are all loaded and ensureEvaluated is run on them, this makes sense for ES6 modules which always evaluate all dependencies before the module that depends on them,

Loader Hooks

2014-06-24 Thread Calvin Metcalf
I've been doing work with the loader hooks and one gap that stands out is that there is no hook to let you manipulate the exports and imports of an module without parsing it yourself, in other words if you want to add, remove, or modify exports or imports of a module you have to write your own

Re: Loader Hooks

2014-06-24 Thread caridy
-loader. /caridy On Jun 24, 2014, at 10:17 AM, Calvin Metcalf calvin.metc...@gmail.com wrote: I've been doing work with the loader hooks and one gap that stands out is that there is no hook to let you manipulate the exports and imports of an module without parsing it yourself, in other words

Re: Loader Hooks

2014-06-24 Thread Calvin Metcalf
Bedford can provide more details on how he implemented this process in es6-module-loader. /caridy On Jun 24, 2014, at 10:17 AM, Calvin Metcalf calvin.metc...@gmail.com wrote: I've been doing work with the loader hooks and one gap that stands out is that there is no hook to let you

Re: Loader Hooks

2014-06-24 Thread caridy
workflow. Maybe Guy Bedford can provide more details on how he implemented this process in es6-module-loader. /caridy On Jun 24, 2014, at 10:17 AM, Calvin Metcalf calvin.metc...@gmail.com wrote: I've been doing work with the loader hooks and one gap that stands out

Re: Loader Hooks

2014-06-24 Thread John Barton
doing work with the loader hooks and one gap that stands out is that there is no hook to let you manipulate the exports and imports of an module without parsing it yourself, in other words if you want to add, remove, or modify exports or imports of a module you have to write your own parsing

Re: Loader Hooks

2014-06-24 Thread Calvin Metcalf
, at 10:17 AM, Calvin Metcalf calvin.metc...@gmail.com wrote: I've been doing work with the loader hooks and one gap that stands out is that there is no hook to let you manipulate the exports and imports of an module without parsing it yourself, in other words if you want to add, remove

Re: Loader Hooks

2014-06-24 Thread Guy Bedford
on how he implemented this process in es6-module-loader. /caridy On Jun 24, 2014, at 10:17 AM, Calvin Metcalf calvin.metc...@gmail.com wrote: I've been doing work with the loader hooks and one gap that stands out is that there is no hook to let you manipulate the exports and imports

Re: Loader Hooks

2014-06-24 Thread Juan Ignacio Dopazo
On Tuesday, June 24, 2014 11:38 AM, Calvin Metcalf calvin.metc...@gmail.com wrote: Say you wanted to add a hook which automatically added an export named filepath to a module is the path to the file For this use case and other similar ones it'd be nice if the `metadata` property of load