An instance of this class is used for invoking the instrumentation hooks on addons.

The instrumentation types currently supported are:

  • init
  • build
  • command
  • shutdown

Method Summary

Public Methods
public

Check if npm and bower installation directories are present, and raise an error message with instructions on how to proceed.

public
instantiateAddons(parent, project, a)

Create instances of a set of "child" addons for a parent addon or project.

Public Methods

lib/models/installation-checker.js:13

public checkInstallations( )

Check if npm and bower installation directories are present, and raise an error message with instructions on how to proceed.

If some of these package managers aren't being used in the project we just ignore them. Their usage is considered by checking the presence of your manifest files: package.json for npm and bower.json for bower.

lib/models/instantiate-addons.js:12

public instantiateAddons(parent, project, a)

Create instances of a set of "child" addons for a parent addon or project.

Parameters:

Name Type Attribute Description
parent Object

an Addon or Project that is the direct containing object of the list of children defined in addonPackages.

project Project

the project that contains the parent (so either the addon's project if parent is an addon, or the project itself if it is a project). It is possible when constructing custom addon instances that the project will actually be undefined--various addon tests do this, for example.

a Object

map of addon name (including scope) to an AddonInfo with the name, path and 'pkg' object for that addon's package.json). These are what is turned into addons.