New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v1.0 Redesign #30
v1.0 Redesign #30
Conversation
README.md
Outdated
|
||
By default, Pluto will only create your objects lazily. That is, factory and constructor functions will only get called | ||
when you ask for them with `module.get(...)`. | ||
Invoke `.eagerlyLoadAll()` after creating your bindings to eagerly bootstrap your application. The result is a promise which resolves to a `Map` holding all bindings by name, fully resolved and injected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be "Invoke .bootstrap()
", based on the example below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D'oh! Good catch! I'll fix that this evening.
Keep 'em coming!
cc: @squarejaw |
lib/pluto.js
Outdated
return instance | ||
} else { | ||
return Promise.resolve(instance) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can just return Promise.resolve(instance)
without having to check if it's a promise or not.
@mmcbride1007 @squarejaw both good catches. Thanks! Updates made. |
Heads up: I'll probably merge this Saturday and move on to pluto-path v1.0. Feel free to add more comments; or toss in additional PRs; or jump over to pluto-path. Issues, feedback, code, and feature requests welcome! |
👍 |
I've had a few years to think about it, and there's some improvements I've wanted to make for a while. This requires breaking changes to the API, so I think we can call this Pluto v1.0.
Big ones:
...and some clean up:
/cc @cvharris @charwking @mmcbride1007 @marcDeSantis @gehbauerct @durp @adubbs