expose block defs and paths
This commit is contained in:
parent
7ed7cd21f5
commit
6c550e2984
1 changed files with 4 additions and 3 deletions
|
|
@ -33,8 +33,7 @@ const
|
|||
})
|
||||
)
|
||||
)
|
||||
},
|
||||
allBlockDefinitionsAndPaths = await gatherBlockFiles()
|
||||
}
|
||||
|
||||
// definitions
|
||||
const
|
||||
|
|
@ -90,7 +89,9 @@ export const
|
|||
importBlockJson = async () =>
|
||||
sortBy(compact(map(await gatherBlockFiles(), processBlock)), "type"),
|
||||
|
||||
// all definitions
|
||||
// defs and paths
|
||||
allBlockDefinitionsAndPaths = await gatherBlockFiles(),
|
||||
// just the definitions
|
||||
allBlockDefinitions = keyBy(compact(map(allBlockDefinitionsAndPaths, "definition")), "type"),
|
||||
// without disabled definitions
|
||||
blockDefinitions = omitBy(allBlockDefinitions, def => def.disabled),
|
||||
|
|
|
|||
Loading…
Reference in a new issue