MCPcopy Create free account
hub / github.com/ember-cli/ember-cli / addPackageToProject

Function addPackageToProject

lib/models/blueprint.js:1071–1079  ·  view source on GitHub ↗

Used to add a package to the project's `package.json`. Generally, this would be done from the `afterInstall` hook, to ensure that a package that is required by a given blueprint is available. @method addPackageToProject @param {String} packageName @param {String} target

(packageName, target)

Source from the content-addressed store, hash-verified

1069 @return {Promise}
1070 */
1071 addPackageToProject(packageName, target) {
1072 let packageObject = { name: packageName };
1073
1074 if (target) {
1075 packageObject.target = target;
1076 }
1077
1078 return this.addPackagesToProject([packageObject]);
1079 },
1080
1081 /**
1082 Used to add multiple packages to the project's `package.json`.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…