vue-feature

1.0.2 • Public • Published

Basic usage

Lightweight directive and instance method in vuejs for feature toggling based on configuration keys in your feature.config.js file.

In your feature.config.js

export default {
	'specific-feature-toggle': {
		status: true
	}
}

In your main.js

import vueFeature from 'vue-feature'
import config from '../path-to-config/feature.config'

Vue.use(vueFeature,config)

In your markup

<div v-feature:specific-feature-toggle>
</div>

In your javascript

mounted(){
  this.$feature('specific-feature-toggle') ? this.dothis() : this.doThat()
}

Readme

Keywords

Package Sidebar

Install

npm i vue-feature

Weekly Downloads

0

Version

1.0.2

License

none

Unpacked Size

45.6 kB

Total Files

19

Last publish

Collaborators

  • derekgilbert