Support AMD loaders that provide a Node.js based server-side component #19
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
I have an AMD loader that provides a server-side component (Node.js based). I would like to add the loader to the set of implementations.
To do this I have modified the test framework to support manifest entries providing installers. A manifest can contain the module id of an installer module. e.g
When the test framework server is started it will scan the manifests for installer properties. If any are found the installer module is loaded and an expected install function called.
The express "app" object is passed to the installer along with a reference to an installerCallback function the the installer calls to indicate it is complete. The callback function starts the framework once all discovered installers have completed.
If no installers are discovered then the server is started directly.
An additional change in this pull request is to add npm as a dev dependency to the package.json. This allows installers to use npm to programmatically install what they need.
An example installer look like this :