1.2.0 • Published 8 years ago

vue-vitual-env v1.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

usage

$ npm install --save vue-vitual-env
// main.js
import Vue from 'vue'
import env from 'vue-vitual-env'
import envConfig from './env.js'  // You need create a file to save your config

Vue.use(env, envConfig)
// In other js file
import env from 'vue-vitual-env'
env.get('APP_DEBUG')
// In vue application, you can use this.$env
{
  ready () {
    this.$env.get('APP_DEBUG')
  }
}
// In template, you can use
{{ $env.get('APP_DEBUG') }}

env.js file

export {
  'APP_DEBUG': true,
  'APP_NAME': 'Vue Env library'
}

Contributing

// install dependencies
$ npm install

// serve with hot reload at localhost:8080
$ npm run dev

// build this library
$ npm run build
1.2.0

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago