component-weatherbite-vuejs
v1.0.12
Published
Vue Weatherbite Widget Component
Downloads
30
Readme
Component Weatherbite Vuejs
Vue Weatherbite Template Component
Synopsis
To deliver the current weather
Code Examples
Install:
npm install component-weatherbite-vuejs --save
Usage:
Vue.use(Weatherbite, options);
or within existing components:
import Moviebite from 'component-weatherbite-vuejs';
export default {
components: {
Weatherbite
}
}
Installation
Install dependencies:
npm install
Copy .env.example to create .env:
cp .env.example .env
Copy config files over:
cp ./src/config/build.js ./src/config/development.js
Serve with hot reload at localhost:8080 (default):
npm run dev
Build for production with minification:
npm run build
Documentation
Properties
Name | Type | Description
------------- | ------------- | -------------
url | String
| The base url origin for api end point
token | String
| API access token
latitude | String
| Latitude of weather location [40.748441]
longitude | String
| longitude of weather location [-73.985793]
format | Number
| The format the weather will be displayed in (Options: fahrenheit
, celsius
) [fahrenheit]
showTitle | Boolean
| Options to display or hide heading [true]
Test
All widgets should have unit tests associated with them. To run all tests
npm test
For developments test with hot reloading at localhost:3001
npm run test:dev
To run tests with coveralls support:
npm run test:coveralls
Style Guide
All project should follow JS Style guide. Style guide is a modified version of airbnb, and should be referenced during development. Any modified rules can be found in .eslintc.json
file.
To run eslint:
npm run lint
To fix eslint errors:
npm run lint:fix