Browse Source

Add feature flags to manifest

master
Andrew Kingston 5 years ago
parent
commit
9bf6600ccd
  1. 12
      packages/server/src/api/controllers/component.js
  2. 4
      packages/standard-components/manifest.json

12
packages/server/src/api/controllers/component.js

@ -20,10 +20,14 @@ exports.fetchAppComponentDefinitions = async function (ctx) {
const definitions = {} const definitions = {}
for (let { manifest, library } of componentManifests) { for (let { manifest, library } of componentManifests) {
for (let key of Object.keys(manifest)) { for (let key of Object.keys(manifest)) {
const fullComponentName = `${library}/${key}`.toLowerCase() if (key === "features") {
definitions[fullComponentName] = { definitions[key] = manifest[key]
component: fullComponentName, } else {
...manifest[key], const fullComponentName = `${library}/${key}`.toLowerCase()
definitions[fullComponentName] = {
component: fullComponentName,
...manifest[key],
}
} }
} }
} }

4
packages/standard-components/manifest.json

@ -1,4 +1,8 @@
{ {
"features": {
"spectrumThemes": true,
"intelligentLoading": true
},
"layout": { "layout": {
"name": "Layout", "name": "Layout",
"description": "This component is specific only to layouts", "description": "This component is specific only to layouts",

Loading…
Cancel
Save