From 313640a3ddc8146f0854b4b75b5b7e9490f493f5 Mon Sep 17 00:00:00 2001 From: cha0s Date: Thu, 28 Jan 2021 12:53:31 -0600 Subject: [PATCH] refactor: trait-components --- packages/entity/src/index.js | 8 ++++---- .../src/resource-controllers/entity/traits/index.jsx | 2 +- .../src/{trait-renderers => trait-components}/emitted.jsx | 0 .../{trait-renderers => trait-components}/emitted.scss | 0 .../src/{trait-renderers => trait-components}/emitter.jsx | 0 .../{trait-renderers => trait-components}/emitter.scss | 0 .../emitter/particle.jsx | 0 .../emitter/particle.scss | 0 8 files changed, 5 insertions(+), 5 deletions(-) rename packages/entity/src/{trait-renderers => trait-components}/emitted.jsx (100%) rename packages/entity/src/{trait-renderers => trait-components}/emitted.scss (100%) rename packages/entity/src/{trait-renderers => trait-components}/emitter.jsx (100%) rename packages/entity/src/{trait-renderers => trait-components}/emitter.scss (100%) rename packages/entity/src/{trait-renderers => trait-components}/emitter/particle.jsx (100%) rename packages/entity/src/{trait-renderers => trait-components}/emitter/particle.scss (100%) diff --git a/packages/entity/src/index.js b/packages/entity/src/index.js index 38fd6fa..d5a1f41 100644 --- a/packages/entity/src/index.js +++ b/packages/entity/src/index.js @@ -9,14 +9,14 @@ export {EntityResourceController}; export default { hooks: { '@latus/core/starting': async (latus) => { - const TraitRenderers = latus.invokeReduce('@persea/entity/trait-renderers'); - latus.set('%trait-renderers', TraitRenderers); + const TraitRenderers = latus.invokeReduce('@persea/entity/trait-components'); + latus.set('%trait-components', TraitRenderers); }, '@persea/core/resource-controllers': () => [ EntityResourceController, ], - '@persea/entity/trait-renderers': () => { - const context = require.context('./trait-renderers', false, /\.jsx$/); + '@persea/entity/trait-components': () => { + const context = require.context('./trait-components', false, /\.jsx$/); return context.keys().reduce((r, key) => ({ ...r, [camelCase(basename(key, extname(key)))]: context(key).default, diff --git a/packages/entity/src/resource-controllers/entity/traits/index.jsx b/packages/entity/src/resource-controllers/entity/traits/index.jsx index 691cdf6..e0f571a 100644 --- a/packages/entity/src/resource-controllers/entity/traits/index.jsx +++ b/packages/entity/src/resource-controllers/entity/traits/index.jsx @@ -62,7 +62,7 @@ const Traits = ({ .map(([, {type}]) => type), types, ); - const TraitRenderers = latus.get('%trait-renderers'); + const TraitRenderers = latus.get('%trait-components'); const tabPanels = types.map((type) => { const TraitRenderer = TraitRenderers[type] ? TraitRenderers[type] diff --git a/packages/entity/src/trait-renderers/emitted.jsx b/packages/entity/src/trait-components/emitted.jsx similarity index 100% rename from packages/entity/src/trait-renderers/emitted.jsx rename to packages/entity/src/trait-components/emitted.jsx diff --git a/packages/entity/src/trait-renderers/emitted.scss b/packages/entity/src/trait-components/emitted.scss similarity index 100% rename from packages/entity/src/trait-renderers/emitted.scss rename to packages/entity/src/trait-components/emitted.scss diff --git a/packages/entity/src/trait-renderers/emitter.jsx b/packages/entity/src/trait-components/emitter.jsx similarity index 100% rename from packages/entity/src/trait-renderers/emitter.jsx rename to packages/entity/src/trait-components/emitter.jsx diff --git a/packages/entity/src/trait-renderers/emitter.scss b/packages/entity/src/trait-components/emitter.scss similarity index 100% rename from packages/entity/src/trait-renderers/emitter.scss rename to packages/entity/src/trait-components/emitter.scss diff --git a/packages/entity/src/trait-renderers/emitter/particle.jsx b/packages/entity/src/trait-components/emitter/particle.jsx similarity index 100% rename from packages/entity/src/trait-renderers/emitter/particle.jsx rename to packages/entity/src/trait-components/emitter/particle.jsx diff --git a/packages/entity/src/trait-renderers/emitter/particle.scss b/packages/entity/src/trait-components/emitter/particle.scss similarity index 100% rename from packages/entity/src/trait-renderers/emitter/particle.scss rename to packages/entity/src/trait-components/emitter/particle.scss