🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@ax2/vue-components

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ax2/vue-components

Ax2 components library including dynamic page builder based on [Vue](https://vuejs.org/).

latest
Source
npmnpm
Version
1.2.1
Version published
Maintainers
1
Created
Source

@ax2/vue-components

Ax2 components library including dynamic page builder based on Vue.

Use semantic-release;

Works with Vue 2.*

Installation

Install via NPM or YARN

npm install @ax2/vue-components --save
yarn add @ax2/vue-components

Register as Plugin

import Vue from 'vue';
import ComponentsLibrary from '@ax2/vue-components';

Vue.use(ComponentsLibrary);

Configuration

import Vue from 'vue';
import ComponentsLibrary from '@ax2/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 '@ax2/vue-components';

const configuration = {};

export default ({ store }) => {
  Vue.use(ComponentsLibrary, { store, ...configuration });
};

Components Library

Working in Local environnement

Using yarn link reference

yarn link # (in this repository)

yarn link @ax2/vue-components # (in repository you want to use your local version)

To reverse process use:

yarn unlink @ax2/vue-components

Changelog

Detailed changes for each release are documented in the release notes.

FAQs

Package last updated on 06 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts