Extends:

CoreObject → AddonDiscovery

AddonDiscovery is responsible for collecting information about all of the addons that will be used with a project.

Constructor Summary

Public Constructors
public

AddonDiscovery is responsible for collecting information about all of the addons that will be used with a project.

Method Summary

Private Methods
private
dependencies(pkg, excludeDevDeps): Object

Returns the dependencies from a package.json

private

Given a particular path, return undefined if the path is not an addon, or if it is, a node with the info about the addon.

private

Returns a tree based on the addons referenced in the provided pkg through the package.json dependencies and optionally devDependencies collections, as well as those discovered addons' child addons.

private

Returns a tree based on the internal addons that may be defined within the project. It does this by consulting the projects supportedInternalAddonPaths() method, which is primarily used for middleware addons.

private

Returns an array containing zero or one nodes, depending on whether or not the passed project is an addon.

private

Returns a tree based on the in-repo addons referenced in the provided pkg through paths listed in the ember-addon entry, as well as those discovered addons' child addons.

private

This is one of the primary APIs for this class and is called by the project. It returns a tree of plain objects that each contain information about a discovered addon. Each node has name, path, pkg and childAddons properties. The latter is an array containing any addons discovered from applying the discovery process to that addon.

private

This is one of the primary APIs for this class and is called by addons. It returns a tree of plain objects that each contain information about a discovered addon. Each node has name, path, pkg and childAddons properties. The latter is an array containing any addons discovered from applying the discovery process to that addon.

Public Constructors

lib/models/addon-discovery.js:15

public AddonDiscovery( )

Private Methods

lib/models/addon-discovery.js:231

private dependencies(pkg, excludeDevDeps): Object

Returns the dependencies from a package.json

Parameters:

Name Type Attribute Description
pkg Object

Package object. If false, the current package is used.

excludeDevDeps Boolean

Whether or not development dependencies should be excluded, defaults to false.

Return:

Object

Dependencies

lib/models/addon-discovery.js:195

private discoverAtPath( )

Given a particular path, return undefined if the path is not an addon, or if it is, a node with the info about the addon.

lib/models/addon-discovery.js:104

private discoverFromDependencies( )

Returns a tree based on the addons referenced in the provided pkg through the package.json dependencies and optionally devDependencies collections, as well as those discovered addons' child addons.

lib/models/addon-discovery.js:174

private discoverFromInternalProjectAddons( )

Returns a tree based on the internal addons that may be defined within the project. It does this by consulting the projects supportedInternalAddonPaths() method, which is primarily used for middleware addons.

lib/models/addon-discovery.js:87

private discoverFromProjectItself( )

Returns an array containing zero or one nodes, depending on whether or not the passed project is an addon.

lib/models/addon-discovery.js:156

private discoverInRepoAddons( )

Returns a tree based on the in-repo addons referenced in the provided pkg through paths listed in the ember-addon entry, as well as those discovered addons' child addons.

lib/models/addon-discovery.js:28

private discoverProjectAddons( )

This is one of the primary APIs for this class and is called by the project. It returns a tree of plain objects that each contain information about a discovered addon. Each node has name, path, pkg and childAddons properties. The latter is an array containing any addons discovered from applying the discovery process to that addon.

lib/models/addon-discovery.js:61

private discoverProjectAddons( )

This is one of the primary APIs for this class and is called by addons. It returns a tree of plain objects that each contain information about a discovered addon. Each node has name, path, pkg and childAddons properties. The latter is an array containing any addons discovered from applying the discovery process to that addon.