Skip to content
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

Merged
merged 21 commits into from Feb 4, 2017
Merged

v1.0 Redesign #30

merged 21 commits into from Feb 4, 2017

Conversation

ecowden
Copy link
Owner

@ecowden ecowden commented Jan 29, 2017

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:

  1. Support asynchronous operation (Asynchronous Injection #25)
  2. Improve bootstrapping (Bundle Bootstrapping #28)
  3. Improve naming (Memoize #12) and syntax (Improve Syntax #27)

...and some clean up:

  1. Modernization (Modernize #26)
  2. Fix ugly constructor hack (Eliminate Ugly Constructor Hack #29)

/cc @cvharris @charwking @mmcbride1007 @marcDeSantis @gehbauerct @durp @adubbs

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.
Copy link
Collaborator

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?

Copy link
Owner Author

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!

@mikemcbride
Copy link
Collaborator

cc: @squarejaw

lib/pluto.js Outdated
return instance
} else {
return Promise.resolve(instance)
}

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.

@ecowden
Copy link
Owner Author

ecowden commented Jan 31, 2017

@mmcbride1007 @squarejaw both good catches. Thanks!

Updates made.

@ecowden
Copy link
Owner Author

ecowden commented Feb 4, 2017

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!

@mikemcbride
Copy link
Collaborator

👍

@coveralls
Copy link

coveralls commented Feb 4, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 5429e85 on one-oh-redesign into 75ece87 on master.

@ecowden ecowden merged commit 6426cb9 into master Feb 4, 2017
@ecowden ecowden deleted the one-oh-redesign branch February 4, 2017 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants