component-basebite-vuejs
| Install | |
|---|---|
npm install component-basebite-vuejs |
|
| Latest Version: | 2.1.2 |
| Vue: | 2 |
| License: | ISC |
| Last Updated: | Jan 5, 2018 |
| Links: | npm |
Component BaseBite Vuejs
Vue Widget Base Component
Synopsis
The base component that all widgets should inherit. Library contains BaseWidget, Heading, Footer, Api, Swiper, Loader components. Each library can be used separately for a drastic change to a widget or be combined for a consisted widget application.
Code Examples
Install:
npm install component-basebite-vuejs --save
Usage:
Vue.use(BaseWidget, options);
or within existing components:
import BaseWidget from 'component-basebite-vuejs';
export default {
components: {
BaseWidget
}
}
Example using all 3 libraries can be found within the examples folder
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 |
| type | String |
The type of widget being generated (Look in config for supported widgets) |
| token | String |
API access token |
| term | String |
Parameter to send to the API request |
| limit | Number |
Limits the number of responses by the request (Not supported by all APIs) [5] |
| showTitle | Boolean |
Options to display or hide heading [true] |
| showFooter | Boolean |
Options to display or hide footer [true] |
Events
| Name | Returns | Description |
|---|---|---|
| widget-data | Object |
Gets the necessary widget data from api |
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
Local Setup
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 2.1.2 | ^2.1.4 | ISC | |
| 2.1.1 | ^2.1.4 | ISC | |
| 2.1.0 | ^2.1.4 | ISC | |
| 2.0.2 | 2.1.4 | ISC | |
| 2.0.1 | 2.1.4 | ISC | |
| 2.0.0 | ^2.1.4 | ISC | |
| 1.5.1 | 2.1.4 | ISC | |
| 1.5.0 | 2.1.4 | ISC | |
| 1.3.3 | 2.1.4 | ISC | |
| 1.3.2 | 2.1.4 | ISC | |
| 1.3.0 | 2.1.4 | ISC | |
| 1.2.19 | 2.1.4 | ISC | |
| 1.2.18 | 2.1.4 | ISC | |
| 1.2.17 | ^2.0.1 | ISC | |
| 1.2.16 | ^2.0.1 | ISC | |
| 1.2.15 | ^2.0.1 | ISC | |
| 1.2.14 | ^2.0.1 | ISC | |
| 1.2.13 | ^2.0.1 | ISC | |
| 1.2.12 | ^2.0.1 | ISC | |
| 1.2.11 | ^2.0.1 | ISC | |
| 1.2.10 | ^2.0.1 | ISC | |
| 1.2.9 | ^2.0.1 | ISC | |
| 1.2.8 | ^2.0.1 | ISC | |
| 1.2.7 | ^2.0.1 | ISC | |
| 1.2.6 | ^2.0.1 | ISC | |
| 1.2.5 | ^2.0.1 | ISC | |
| 1.2.4 | ^2.0.1 | ISC | |
| 1.2.3 | ^2.0.1 | ISC | |
| 1.2.2 | ^2.0.1 | ISC | |
| 1.2.1 | ^2.0.1 | ISC |
Showing the latest 30 of 73. See every release on npm