Skip to content

Commit

Permalink
Merge f57a2fb into 53c8d15
Browse files Browse the repository at this point in the history
  • Loading branch information
dafortin committed Apr 19, 2017
2 parents 53c8d15 + f57a2fb commit ffb42dd
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 17 deletions.
39 changes: 25 additions & 14 deletions blueprints/ember-frost-file-picker/index.js
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)
}
}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@
"ember-disable-proxy-controllers": "^1.0.1",
"ember-elsewhere": "~0.4.1",
"ember-export-application-global": "^1.0.4",
"ember-frost-core": "^1.0.0",
"ember-hook": "^1.3.5",
"ember-load-initializers": "^0.5.0",
"ember-lodash": "~0.0.7",
"ember-prop-types": "~3.0.0",
"ember-prop-types": "3.11.0",
"ember-resolver": "^2.0.3",
"ember-sinon": "^0.5.1",
"ember-spread": "1.1.4",
"ember-test-utils": "^1.10.7",
"ember-truth-helpers": "^1.2.0",
"loader.js": "^4.0.0"
Expand All @@ -68,10 +68,11 @@
"ember-cli-babel": "^5.1.5",
"ember-cli-htmlbars": "^1.0.1",
"ember-cli-sass": "^5.2.0",
"ember-frost-core": "^1.14.3",
"ember-prop-types": "^3.0.0",
"liquid-fire": "~0.26.0"
},
"ember-addon": {
"configPath": "tests/dummy/config"
}
}
}

0 comments on commit ffb42dd

Please sign in to comment.