@magnolia/cli-vue-prototypes
v1.0.0
Published
Vue components and pages prototypes for @magnolia/cli-create-component and @magnolia/cli-create-page
Downloads
13
Readme
Cli Vue Prototypes
Package for @magnolia/cli-create-component-plugin and @magnolia/cli-create-page-plugin that provides Vue component and page prototypes.
Usage
To use these prototypes with @magnolia/cli-create-component-plugin or @magnolia/cli-create-page-plugin, follow these steps:
Running the Command:
If the framework is not configured in mgnl.config.js, running:
npm run mgnl -- create-component Hero
will prompt you to choose a framework. The selected framework will then be saved in mgnl.config.js.
Configuring the Framework:
Alternatively, you can predefine the framework in mgnl.config.js to use it automatically:
import CreatePagePlugin from "@magnolia/cli-create-page-plugin"; import CreateComponentPlugin from "@magnolia/cli-create-component-plugin"; export default { // Other configurations... plugins: [ new CreatePagePlugin({ framework: '@magnolia/cli-vue-prototypes@<version>', // Additional properties... }), new CreateComponentPlugin({ framework: '@magnolia/cli-vue-prototypes@<version>', // Additional properties... }), ] };
Available prototypes
Component prototypes
- basic: variant contains a Vue component with 'text' property only. Basic LM component. Available types: 'vue'.
- basic-directory_based: variant is same as 'basic', but creates folder with component name and exports index file. Available types: 'vue'.
- nuxt_v2 variant contains a component compatible with Nuxt v3 project. Available types: 'vue'.
- nuxt_v3 variant contains a component compatible with Nuxt v3 project. Available types: 'vue'.
Page prototypes
- basic: variant contains a Vue page with 'title' property only. Available types: 'vue'.
- basic-directory_based: variant is same as 'basic', but creates folder with page name and exports index file. Available types: 'vue'.
- nuxt_v2 variant contains a page compatible with Nuxt v2 project. Available types: 'vue'.
- nuxt_v3 variant contains a page compatible with Nuxt v3 project. Available types: 'vue'.
Prototype Documentation
For detailed documentation of the Vue Prototypes, please refer to Prototype Documentation
Plugins Documentation
For more information on using the plugins with these prototypes, refer to the Create Page and Create Component plugin documentation.