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

Adopt builder plugin resolver API from RequireJS #31

Closed
kitsonk opened this issue Sep 20, 2015 · 1 comment
Closed

Adopt builder plugin resolver API from RequireJS #31

kitsonk opened this issue Sep 20, 2015 · 1 comment
Assignees
Milestone

Comments

@kitsonk
Copy link
Member

kitsonk commented Sep 20, 2015

While this isn't strictly a loader thing, this seems to be the right place to discuss this at the moment. In Dojo 1, build resolvers for plugins were part of the builder.

RequireJS took a different approach and extended the plugin API to accommodate build time resolution of the plugins:

  • write(pluginName, moduleName, write) - called by the builder when the plugin would output something that should belong in an built layer.
  • onLayerEnd(write, data) - called by the builder when the end of a layer is reached, either for the plugin to add something or reset some sort of state.
  • writeFile(pluginName, name, parentRequire, write) - called by the builder when the plugin needs to write out an alternative file.
  • pluginBuilder - an alternative MID to be used by the builder, therefore the build logic doesn't have to be included in the normal plugin.

I would recommend that we adopt this API and focus our build toolchain on leveraging it.

@kitsonk kitsonk added this to the beta.4 milestone Mar 11, 2016
@kitsonk kitsonk modified the milestones: June 2016, beta.4 Apr 8, 2016
@kitsonk kitsonk modified the milestones: 2016.06, 2016.07 Jul 4, 2016
@kitsonk kitsonk modified the milestones: 2016.07, 2016.08 Aug 1, 2016
@kitsonk
Copy link
Member Author

kitsonk commented Oct 4, 2016

At this point, we do not anticipate needing to adopt this API to provide optimised builds.

@kitsonk kitsonk closed this as completed Oct 4, 2016
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

2 participants