airyland

Vue config

A better way to get App config

Version Version: 1.0.0 Version Updated: 02/28/2018 By: airyland License: MIT

DownloadsLast30Days: 2k

https://github.com/airyland/vue-config

npm i vue-config
yarn add vue-config

vue-config

An easy way to get App config

Usage

npm install vue-config
const vueConfig = require('vue-config')
const configs = {
  API: 'http://localhost:6003' // It's better to require a config file
}

Vue.use(vueConfig, configs)

// A param named `$config` will be injected in to every component, so in your component, you can get config easily
const API = this.$config.API

Contributors


Dependencies


DevDependencies


Tags: vue