Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sedona-cms/blocks-meta-loader
Loads meta information from vue components for Sedona CMS block editor
https://github.com/sedona-cms/blocks-meta-loader
sedona-cms
Last synced: 3 days ago
JSON representation
Loads meta information from vue components for Sedona CMS block editor
- Host: GitHub
- URL: https://github.com/sedona-cms/blocks-meta-loader
- Owner: sedona-cms
- License: mit
- Created: 2020-03-26T10:05:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T02:43:18.000Z (almost 2 years ago)
- Last Synced: 2024-10-07T02:36:40.671Z (about 1 month ago)
- Topics: sedona-cms
- Language: TypeScript
- Homepage:
- Size: 928 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Blocks Meta Loader
![NPM publish](https://github.com/sedona-cms/blocks-meta-loader/workflows/NPM%20publish/badge.svg)
Loads meta information from Vue components for Sedona CMS block editor.
May be used for component libraries that may be used in admin UI Sedona CMS.
## General
The meta information of the block is not necessary to specifically describe. It will be automatically received when parsing the component file. But it can be supplemented in a custom section in the Vue file or in a separate JSON file.
## Example
will be soon
## Install
`npm i -D @sedona-cms/blocks-meta-loader`
## Usage
```typescript
import { BlocksMetaLoader, BlockMeta } from '@sedona-cms/blocks-meta-loader'const loader = new BlocksMetaLoader()
const blocksMeta: BlockMeta[] = loader.getMetaFromFile('')/// blocksMeta may be looks like this
`Array [
Object {
"group": "general",
"name": "",
"props": Object {
"color": Object {
"default": "",
"required": true,
"title": "Color",
"type": "string",
},
},
"title": "Pretty Block Name",
},]````