-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
29 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,30 @@ | ||
const blueprintHelper = require('ember-frost-core/blueprint-helper') | ||
|
||
module.exports = { | ||
description: '', | ||
normalizeEntityName: function () {}, | ||
afterInstall: function (options) { | ||
const addonsToAdd = [ | ||
{name: 'ember-frost-core', target: '^1.14.3'}, | ||
{name: 'ember-prop-types', target: '^3.0.0'}, | ||
{name: 'ember-hook', target: '^1.3.1'} | ||
] | ||
|
||
// Get the packages installed in the consumer app/addon. Packages that are already installed in the consumer within | ||
// the required semver range will not be re-installed or have blueprints re-run. | ||
const consumerPackages = blueprintHelper.consumer.getPackages(options) | ||
|
||
/** | ||
Installs specified packages at the root level of the application. | ||
Triggered by 'ember install <addon name>'. | ||
@returns {Promise} package names and versions | ||
*/ | ||
afterInstall: function () { | ||
return this.addAddonsToProject({ | ||
packages: [ | ||
{name: 'ember-frost-core', target: '^1.0.0'}, | ||
{name: 'ember-prop-types', target: '^3.0.0'}, | ||
{name: 'ember-hook', target: '^1.3.1'} | ||
] | ||
// Get the packages to install (not already installed) from a list of potential packages | ||
return blueprintHelper.packageHandler.getPkgsToInstall(addonsToAdd, consumerPackages).then((pkgsToInstall) => { | ||
if (pkgsToInstall.length !== 0) { | ||
// Call the blueprint hook | ||
return this.addAddonsToProject({ | ||
packages: pkgsToInstall | ||
}) | ||
} | ||
}) | ||
}, | ||
|
||
normalizeEntityName: function () { | ||
// this prevents an error when the entityName is | ||
// not specified (since that doesn't actually matter to us) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters