Skip to content

Commit 9a83665

Browse files
author
Javier Diaz
committed
docs: added documentation
1 parent afb9ff0 commit 9a83665

File tree

5 files changed

+228
-0
lines changed

5 files changed

+228
-0
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Issue report
2+
3+
## Current behavior
4+
<!-- Describe how the issue manifests. -->
5+
6+
## Input Code
7+
<!-- REPL or Repo link if applicable: -->
8+
```js
9+
const your = (code) => here;
10+
```
11+
12+
## Expected behavior
13+
<!-- A clear and concise description of what you expected to happen (or code). -->
14+
15+
## Posible solution
16+
<!-- Only if you have suggestions on a fix for the bug -->
17+
18+
## Environment
19+
<pre><code>
20+
Plugin version: X.Y.Z
21+
<!-- Check whether this is still an issue in the most recent version -->
22+
23+
For tooling issue:
24+
- Node version: XX <!-- run `node --version` -->
25+
- Platform: <!-- Mac, Linux, Windows -->
26+
27+
Others:
28+
<!-- Anything else relevant? Operating system version, IDE, package manager, etc. -->
29+
</pre></code>

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## PR Checklist
2+
Please check if your PR fulfills the following requirements:
3+
4+
- [ ] The commit message follows our guidelines: https://github.com/coderdiaz/vue-status-indicator/blob/master/CONTRIBUTING.md
5+
- [ ] Tests for the changes have been added (for bug fixes / features).
6+
- [ ] Docs have been added / updated (for bug fixes / features).
7+
8+
## PR Type
9+
What kind of change does this PR introduce?
10+
11+
<!-- Please check the one that applies to this PR using "x". -->
12+
```
13+
[ ] Bugfixes
14+
[ ] Feature
15+
[ ] Code style update (formatting, local variables)
16+
[ ] Refactoring (no functional changes, no api changes)
17+
[ ] Build related changes
18+
[ ] CI related changes
19+
[ ] Other... Please describe:
20+
```
21+
22+
## What is the current behavior?
23+
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
24+
25+
## What is the new behaviour?
26+
27+
## Does this PR introduce a breaking change?
28+
```
29+
[ ] Yes
30+
[ ] No
31+
```
32+
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->

CONTRIBUTING.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
## Contribute
2+
We would love for you to contribute and help make it even better than it is todat! As a contributor, here are the guidelines we would like you to follow:
3+
4+
## Development Setup
5+
You will need Node.js version +8.9.0.
6+
1. After clonning the repo, run:
7+
```bash
8+
$ npm i # or yarn install
9+
```
10+
11+
### Commonly use NPM scripts
12+
```bash
13+
# build all packages
14+
$ npm run build
15+
16+
# run full unit-tests suite
17+
$ npm run test:unit
18+
19+
# run linter
20+
$ npm run lint
21+
```
22+
23+
## Found a Bug?
24+
If you find a bug in source code, you can help us by submitting an issue to our GitHub repository. Even better, you can submit a Pull Request with a fix.
25+
26+
## Missing a Feature?
27+
You can request a new feature by submitting an issue to our GitHub repository. If you would like to implement a new feature, please submit an issue with a proposal for your work first, to be sure that we can use it. Please consider what kind of change it is:
28+
- For a **Major Feature**, first open an issue and outline your proposal so that it can be discussed. This will also allow us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted in the project. For your issue name, please prefix your proposal with `[discussion]`, for example "[discussion]: your feature idea".
29+
- **Small Features** can be crafted and firectly submitted as a Pull Request.
30+
31+
## Coding Rules
32+
To ensure consistency throughout the source code, keep these rules in mind as you are working:
33+
- All feature or bug fixes **must be tested** by one or more specs (unit-tests).
34+
- We follow [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript), but wrap all code at **100 characters**.
35+
36+
## Commit Message Guidelines
37+
We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that are easy to follow when looking through the **project history**. But also, we use git commit messages to **generate the change log**.
38+
39+
### Type
40+
Must be one of the following:
41+
- **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm).
42+
- **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs).
43+
- **docs**: Documentation only changes.
44+
- **feature**: A new feature.
45+
- **bugfix**: A bug fix.
46+
- **refactor**: A code change that neither fixes a bug nor adds a feature.
47+
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc).
48+
- **test**: Adding missing tests or correcting existing tests.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Javier Diaz Chamorro
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# [Status Indicator](https://github.com/coderdiaz/vue-status-indicator) &middot; [![NPMVERSION](https://img.shields.io/npm/v/vue-status-indicator.svg)](http://npmjs.com/package/vue-status-indicator) [![GITHUBSTARS](https://img.shields.io/github/stars/coderdiaz/vue-status-indicator.svg)](https://github.com/coderdiaz/vue-status-indicator/stargazers) [![BUILD](https://travis-ci.org/coderdiaz/vue-status-indicator.svg?branch=master)](https://travis-ci.org/coderdiaz/vue-status-indicator) [![DOWNLOADS](https://img.shields.io/npm/dt/vue-status-indicator.svg)](https://npmjs.com/package/vue-status-indicator)
2+
3+
A Vue component to show a status indicator as colored dots. This is a fork of [status-indicator](https://github.com/tnhu/status-indicator) with a few changes for use it with Vue.
4+
5+
## Install/Usage
6+
<!-- Replace the docs for usage the plugin -->
7+
```sh
8+
# Install with npm
9+
$ npm i -S vue-status-indicator
10+
11+
# or yarn
12+
$ yarn add vue-status-indicator
13+
```
14+
15+
```html
16+
<div id="app">
17+
<status-indicator status="active" />
18+
</div>
19+
```
20+
21+
You can use **Local Registration**:
22+
```js
23+
import { StatusIndicator } from 'vue-status-indicator';
24+
new Vue({
25+
el: '#app',
26+
components: {
27+
StatusIndicator,
28+
},
29+
});
30+
```
31+
32+
or **Global Registration**:
33+
```js
34+
import StatusIndicator from 'vue-status-indicator';
35+
Vue.use(StatusIndicator);
36+
37+
// or with a custom component name
38+
import { StatusIndicator } from 'vue-status-indicator';
39+
Vue.component('custom-name', StatusIndicator);
40+
```
41+
42+
### Usage in browser
43+
<!-- Write an example for use the plugin in browser from CDN -->
44+
In browser you can use Unpkg, Jsdelivr, CDN.js, etc.
45+
```sh
46+
# Unpkg
47+
https://unpkg.com/vue-status-indicator@latest/dist/vue-status-indicator.js
48+
49+
# JSDelivr
50+
https://cdn.jsdelivr.net/npm/vue-status-indicator@latest/dist/vue-status-indicator.min.js
51+
```
52+
53+
### Supported Browsers
54+
Latest versions of Chrome/Firefox/Safari/IE/Opera.
55+
56+
## Documentation
57+
<!-- Add all documentation about the plugin: props, events, etc -->
58+
### Props
59+
|Name|Description|Type|Default|Required|
60+
|---|---|---|---|---|
61+
|status|Status color for the dot|String|""|false|
62+
|pulse|Enable or disable the pulse effect|Boolean|false|false|
63+
64+
### Customatization
65+
You are able to customize the dot by CSS variables, default configuration is listed below.
66+
67+
```css
68+
:root {
69+
--status-indicator-size: 10px;
70+
--status-indicator-animation-duration: 2s;
71+
72+
--status-indicator-color: rgb(216, 226, 233);
73+
--status-indicator-color-semi: rgba(216, 226, 233, .5);
74+
--status-indicator-color-transparent: rgba(216, 226, 233, 0);
75+
76+
--status-indicator-color-active: rgb(0, 149, 255);
77+
--status-indicator-color-active-semi: rgba(0, 149, 255, .5);
78+
--status-indicator-color-active-transparent: rgba(0, 149, 255, 0);
79+
80+
--status-indicator-color-positive: rgb(75, 210, 143);
81+
--status-indicator-color-positive-semi: rgba(75, 210, 143, .5);
82+
--status-indicator-color-positive-transparent: rgba(75, 210, 143, 0);
83+
84+
--status-indicator-color-intermediary: rgb(255, 170, 0);
85+
--status-indicator-color-intermediary-semi: rgba(255, 170, 0, .5);
86+
--status-indicator-color-intermediary-transparent: rgba(255, 170, 0, 0);
87+
88+
--status-indicator-color-negative: rgb(255, 77, 77);
89+
--status-indicator-color-negative-semi: rgba(255, 77, 77, .5);
90+
--status-indicator-color-negative-transparent: rgba(255, 77, 77, 0);
91+
}
92+
```
93+
94+
## Community
95+
All feedback and suggestions are welcome!
96+
97+
## License
98+
This is a open-source software licensed under the [MIT license](https://raw.githubusercontent.com/coderdiaz/vue-status-indicator/master/LICENSE)

0 commit comments

Comments
 (0)