@codekraft-studio/vue-convert-units
v0.1.1
Published
Convert units with vue integrating convert-units
Downloads
262
Readme
vue-convert-units
A VueJs wrapper for convert-units module
See it in action on the demo.
Installation
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.
Development
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
Compiles and hot-reloads for development
This starts the development server with files watching and hot modules replacement.
yarn run serve
Compiles and minifies for production
This build the source code into the final minified distribution in various formats.
yarn run build
Lints and fixes files
This command ensure all files are linted according to the project rules before committing them into the repository.
yarn run lint
Contributing
- 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
License
This package is released under MIT License.