component-basebite-vuejs v2.1.2
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 --saveUsage:
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 installCopy .env.example to create .env:
cp .env.example .envCopy config files over:
cp ./src/config/build.js ./src/config/development.jsServe with hot reload at localhost:8080 (default):
npm run devBuild for production with minification:
npm run buildDocumentation
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 testFor developments test with hot reloading at localhost:3001
npm run test:devTo run tests with coveralls support:
npm run test:coverallsStyle 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 lintTo fix eslint errors:
npm run lint:fixLocal Setup
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago