Skip to content

Commit

Permalink
fix(addon): add required dependencies to addon blueprints
Browse files Browse the repository at this point in the history
  • Loading branch information
anehx authored and czosel committed Apr 18, 2023
1 parent 0b16e05 commit 7f0173d
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,22 @@ module.exports = {
normalizeEntityName() {},

afterInstall() {
/**
* Automatically install all ember addons that expose helpers / components
* used in templates of the addon itself. Other dependencies that are only
* used in JS code don't need to be installed in the host app and therefore
* don't have to be included here.
*/
return this.addAddonsToProject({
packages: [
{ name: "@projectcaluma/ember-core" },
{ name: "ember-engines" },
{ name: "ember-changeset" },
{ name: "ember-composable-helpers" },
{ name: "ember-concurrency" },
{ name: "ember-engines" },
{ name: "ember-sortable" },
{ name: "ember-power-select" },
{ name: "ember-validated-form" },
],
});
},
Expand Down
6 changes: 6 additions & 0 deletions packages/core/blueprints/@projectcaluma/ember-core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ module.exports = {
normalizeEntityName() {},

afterInstall() {
/**
* Automatically install all ember addons that expose helpers / components
* used in templates of the addon itself. Other dependencies that are only
* used in JS code don't need to be installed in the host app and therefore
* don't have to be included here.
*/
return this.addAddonsToProject({
packages: [
{ name: "ember-apollo-client" },
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"use strict";

module.exports = {
normalizeEntityName() {},

afterInstall() {
/**
* Automatically install all ember addons that expose helpers / components
* used in templates of the addon itself. Other dependencies that are only
* used in JS code don't need to be installed in the host app and therefore
* don't have to be included here.
*/
return this.addAddonsToProject({
packages: [
{ name: "@ember/legacy-built-in-components" },
{ name: "@projectcaluma/ember-core" },
{ name: "@projectcaluma/ember-form" },
{ name: "@projectcaluma/ember-workflow" },
{ name: "ember-concurrency" },
{ name: "ember-engines" },
{ name: "ember-svg-jar" },
],
});
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,24 @@ module.exports = {
normalizeEntityName() {},

afterInstall() {
/**
* Automatically install all ember addons that expose helpers / components
* used in templates of the addon itself. Other dependencies that are only
* used in JS code don't need to be installed in the host app and therefore
* don't have to be included here.
*/
return this.addAddonsToProject({
packages: [
{ name: "@ember/legacy-built-in-components" },
{ name: "@projectcaluma/ember-core" },
{ name: "@projectcaluma/ember-form" },
{ name: "ember-changeset" },
{ name: "ember-composable-helpers" },
{ name: "ember-engines" },
{ name: "ember-math-helpers" },
{ name: "ember-flatpickr" },
{ name: "ember-math-helpers" },
{ name: "ember-power-select" },
{ name: "ember-validated-form" },
],
});
},
Expand Down
12 changes: 10 additions & 2 deletions packages/form/blueprints/@projectcaluma/ember-form/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,23 @@ module.exports = {
normalizeEntityName() {},

afterInstall() {
/**
* Automatically install all ember addons that expose helpers / components
* used in templates of the addon itself. Other dependencies that are only
* used in JS code don't need to be installed in the host app and therefore
* don't have to be included here.
*/
return this.addAddonsToProject({
packages: [
{ name: "@projectcaluma/ember-core" },
{ name: "ember-autoresize-modifier" },
{ name: "ember-cli-showdown" },
{ name: "ember-composable-helpers" },
{ name: "ember-math-helpers" },
{ name: "ember-concurrency" },
{ name: "ember-flatpickr" },
{ name: "ember-in-viewport" },
{ name: "ember-math-helpers" },
{ name: "ember-power-select" },
{ name: "ember-autoresize-modifier" },
],
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ module.exports = {
normalizeEntityName() {},

afterInstall() {
/**
* Automatically install all ember addons that expose helpers / components
* used in templates of the addon itself. Other dependencies that are only
* used in JS code don't need to be installed in the host app and therefore
* don't have to be included here.
*/
return this.addAddonsToProject({
packages: [{ name: "ember-cli-mirage" }],
}).then(() => this.addPackagesToProject([{ name: "faker" }]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ module.exports = {
normalizeEntityName() {},

afterInstall() {
/**
* Automatically install all ember addons that expose helpers / components
* used in templates of the addon itself. Other dependencies that are only
* used in JS code don't need to be installed in the host app and therefore
* don't have to be included here.
*/
return this.addAddonsToProject({
packages: [
{ name: "@projectcaluma/ember-core" },
{ name: "ember-composable-helpers" },
{ name: "ember-concurrency" },
{ name: "ember-truth-helpers" },
],
});
Expand Down

0 comments on commit 7f0173d

Please sign in to comment.