Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 613 Bytes

README.md

File metadata and controls

38 lines (27 loc) · 613 Bytes

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()
}