@lmpgweb/vue-components
v1.0.0
Published
[![Build Status](https://lmpgweb.semaphoreci.com/badges/vue-components/branches/master.svg?style=shields&key=d42dbef3-c986-4f0c-a722-5f9369047946)](https://lmpgweb.semaphoreci.com/projects/vue-components)
Downloads
3
Readme
@lmpgweb/vue-components
LMPG components library including dynamic page builder based on Vue.
Use semantic-release;
Works with Vue 2.*
Installation
Install via NPM or YARN
npm install @lmpgweb/vue-components --save
yarn add @lmpgweb/vue-components
Register as Plugin
import Vue from 'vue';
import ComponentsLibrary from '@lmpgweb/vue-components';
Vue.use(ComponentsLibrary);
Configuration
import Vue from 'vue';
import ComponentsLibrary from '@lmpgweb/vue-components';
import CustomButton from './components/CustomButton';
const configuration = {
config: { // Default config
breakpoints: { // Default breakpoints
xs: 0,
sm: 576,
md: 768,
lg: 1024,
xl: 1280,
},
apiUrl: process.env.baseURL || 'http://127.0.0.1:3002/api', // Url to call for page builder info
},
allComponents: true, // By default register all components
components: ['PageBuilder'], // Register only some component globally
customComponents: { // Override some component from library
ButtonComponent: CustomButton,
},
};
Vue.use(ComponentsLibrary, configuration);
Component are register globally, you can use them directly Example:
<template>
<PageBuilder />
</template>
Install component in nuxt
You need to pass the nuxt store to install properly package store and have available state management
import Vue from 'vue';
import ComponentsLibrary from '@lmpgweb/vue-components';
const configuration = {};
export default ({ store }) => {
Vue.use(ComponentsLibrary, { store, ...configuration });
};
Components Library
- [ ] PageBuilder Documentation
- [ ] Block Documentation
- [ ] ButtonComponent Documentation
- [ ] Card Documentation
- [ ] Carousel Documentation
- [ ] Container Documentation
- [ ] Element Documentation
- [ ] HtmlComponent Documentation
- [ ] ImageComponent Documentation
- [ ] Section Documentation
- [ ] Video Documentation
Working in Local environnement
Using yarn link reference
yarn link # (in this repository)
yarn link @lmpgweb/vue-components # (in repository you want to use your local version)
To reverse process use:
yarn unlink @lmpgweb/vue-components
Changelog
Detailed changes for each release are documented in the release notes.