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

Components 'loaded' Promise & loopback <--> components contract #3248

Closed
anodynos opened this issue Mar 3, 2017 · 1 comment
Closed

Components 'loaded' Promise & loopback <--> components contract #3248

anodynos opened this issue Mar 3, 2017 · 1 comment

Comments

@anodynos
Copy link

anodynos commented Mar 3, 2017

New Feature:

It would be great if we could add support for a Promise to be returned for each loopback-component-XXX loaded status + more.

This will allow us to decide whether to perform a task or not, or even disable parts of the API's functionality, wait before running tests etc.

See for example this workaround beginning of a nice and simple loopback <--> components contract for auto-migration snowyu/loopback-component-auto-migrate.js#4

In summary, we need a (lightweight) contract so components can be looked up as app.components['superPlugin'], and provide some rudimentary lifecycle (then) hooks (eg loaded, stopped etc) and even have a custom exported object.

@anodynos anodynos mentioned this issue Mar 3, 2017
32 tasks
@bajtos
Copy link
Member

bajtos commented Mar 6, 2017

@raymondfeng @davidcheung could you PTAL please? How does this fit into the new loopback-boot design/architecture?

FWIW, loopback-component-explorer is "publishing" its configuration via app.set('loopback-component-explorer'), see https://github.com/strongloop/loopback-component-explorer/blob/188603f352e1a6a6ba7587aaa0a9e3e1a75ce387/index.js#L38

@siddhipai siddhipai removed the boot label Mar 27, 2017
@stale stale bot added the stale label Aug 23, 2017
@stale stale bot closed this as completed Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants