Skip to content

A module to provide the installed Vue version. Useful for community plugins and components with different implementations for different versions of Vue.js. 📝

License

Notifications You must be signed in to change notification settings

yveyeh/vue-versions

Repository files navigation

Vue-Versions logo

Donate With PayPal Stable NPM Version License

Vue-Versions

vue-versions is a module to provide the installed Vue full version as in (x.y.z) and the individual major (x), minor(y), and patch(z) as well. It is useful for community plugins and components with different implementations for different versions of Vue.js.

Dependencies

Installation and Usage

  • Installation

    • With NPM:
    $ npm i vue-versions
    • With Yarn:
    $ yarn add vue-versions
  • Usage

    import { Vue, Component } from 'vue-property-decorator';
    import VueVersions from 'vue-versions';
    
    @Component({ template: require('[PATH_TO_TEMPLATE]') })
    
    export default class [CLASS_NAME] extends Vue {
    
        public vs: VueVersions = new VueVersions();
    
        mounted() {
            console.log(this.vs.getVersionNumber(Vue));
            console.log(this.vs.getVersionNumber(Vue, 'major'));
            console.log(this.vs.getVersionNumber(Vue, 'minor'));
            console.log(this.vs.getVersionNumber(Vue, 'patch'));
            this.vs.getVersionNumber(Vue, 'test'); // should throw an error in the console.
        }
    
    }

Contributors


📢: Awareness, 📝: Blogposts, 💻: Code, 🎨: Design, 📚: Documentation.

Support vue-versions 🎁 💳

We will be very grateful if you support the project with anything you have, and can.
It will help us with a few resources we need in order to keep improving the project and also to provide more useful components and plugins. We will also display your logo and organization name in the Financial Contributors section below.

Donate With PayPal

Or

Buy Me A Coffee

  • Financial Contributors:

License

The MIT License (MIT).

Copyright (c) 2020, Yufenyuy Veyeh Didier.

About

A module to provide the installed Vue version. Useful for community plugins and components with different implementations for different versions of Vue.js. 📝

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published