You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 25, 2019. It is now read-only.
// locator initialization
var locator = new Locator({
buildDirectory: 'build'
});
locator.plug(pluginOne())
.plug(pluginTwo())
.plug(pluginThree())
.parseBundle(__dirname, {});
locator.ready.then(function(have) {
// do something...
});
this will facilitate passing locator instance around into different components that requires filesystem abstraction and let them know when locator is ready to be used.
related to modown trello card 203
The text was updated successfully, but these errors were encountered:
I will also argue that the __dirname passed into parseBundle should be a property of the instance since we don't expect parseBundle to be called twice for a locator instance.
locatorObj.parseBundle() already returns the then. is a getter needed?
// current api
var locator = new Locator({
buildDirectory: 'build'
});
var ready = locator.plug(pluginOne())
.plug(pluginTwo())
.plug(pluginThree())
.parseBundle(__dirname, {});
// the "then" function
ready(function(have) {
// do something...
});
Early on while developing the locator we were uncertain if parseBundle() would be called multiple times. Since now it's not intended to be, and instead is intended to be called once at the "root" directory it should perhaps be called parseAppRoot() or parseRootBundle().
@drewfish that sounds good (or maybe just parse, or exec, or something). also moving options from the parse method to the constructor where it makes sense, and making available some metadata available as @caridy suggests
this will facilitate passing locator instance around into different components that requires filesystem abstraction and let them know when locator is ready to be used.
related to modown trello card 203
The text was updated successfully, but these errors were encountered: