A VueJs wrapper for convert-units module
See it in action on the demo.
Download the project using your favourite package manager:
npm install @codekraft-studio/vue-convert-units
yarn install @codekraft-studio/vue-convert-units
This command will download this project and the convert-units package by ben-ng.
Than load it inside your application main file:
import Vue from 'vue'
import VueConvertUnits from '@codekraft-studio/vue-convert-units'
Vue.use(VueConvertUnits)
Using it is very simple since it maps to convert-units method, below an example of the basic usage:
<p>{{12000 | convert('m', 'best')}}</p>
<p>{{units | convert(unitsFrom, 'best')}}</p>
You can refer to the original documentation to see how it's working in details.
If you want to help in the development of this project fork the repository than follow this instructions to setup the development environment.
yarn install
This starts the development server with files watching and hot modules replacement.
yarn run serve
This build the source code into the final minified distribution in various formats.
yarn run build
This command ensure all files are linted according to the project rules before committing them into the repository.
yarn run lint
- Create an issue and describe your idea
- Fork the project (https://github.com/codekraft-studio/vue-convert-units/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Publish the branch (
git push origin my-new-feature
) - Add some test for your new feature
- Create a new Pull Request
This package is released under MIT License.