Skip to content

Commit bd3f77e

Browse files
authored
Merge pull request #92 from setaman/v2-improve-build
V2 improve build
2 parents 3f84fd7 + 4a72146 commit bd3f77e

File tree

7 files changed

+212
-117
lines changed

7 files changed

+212
-117
lines changed

README.md

+22-11
Original file line numberDiff line numberDiff line change
@@ -34,27 +34,38 @@ Install the library via npm:
3434
```
3535
npm i vue-ellipse-progress
3636
```
37-
The component is provided as a Vue.js plugin. So just initialize it in your ``main.js``:
37+
You can initialize the component globally as a plugin or import it in a specific component of your app.
38+
39+
#### Initialize as Plugin
40+
Import and initialize the component in your `main.js`. After initialization, the component is available as `<ve-progress/>`.
41+
You can also assign a custom name to the component:
3842
```js
3943
import { createApp } from "vue";
40-
import VueEllipseProgress from 'vue-ellipse-progress';
41-
createApp(App).use(VueEllipseProgress);
42-
// createApp(App).use(VueEllipseProgress, "vep"); you can define a name and use the plugin like <vep/>
44+
import veProgress from "vue-ellipse-progress";
45+
createApp(App).use(veProgress);
46+
// createApp(App).use(veProgress, "vep"); define custom name
47+
```
48+
49+
#### Import component
50+
You also have the option to import the component directly:
51+
```js
52+
import { VeProgress } from "vue-ellipse-progress";
4353
```
4454

4555
### CDN
46-
Use this option where you have a global Vue.js instance available. You can customize and get the bundled and minified
56+
You can customize and get the bundled and minified
4757
component from [JSDelivr](https://www.jsdelivr.com/package/npm/vue-ellipse-progress).
48-
Just add the following line to your HTML and start using the component, nothing more is required:
49-
58+
Just add the following line to your HTML and initialize the component as plugin:
5059
```html
5160
<script src="https://cdn.jsdelivr.net/npm/vue-ellipse-progress/dist/vue-ellipse-progress.umd.min.js"></script>
61+
...
62+
createApp(App).use(veprogress);
5263
```
5364

5465
## Usage
55-
After you have initialized the component, use it everywhere you want in your application:
66+
After you have initialized the component, you are ready to create your circles:
5667
```html
57-
<vue-ellipse-progress
68+
<ve-progress
5869
:data="circles"
5970
:progress="progress"
6071
:angle="-90"
@@ -85,12 +96,12 @@ After you have initialized the component, use it everywhere you want in your app
8596
<span slot="legend-value">/200</span>
8697
<p slot="legend-caption">GOOD JOB</p>
8798

88-
</vue-ellipse-progress>
99+
</ve-progress>
89100
```
90101
## Options
91102
You are ready to go with just following line:
92103
```html
93-
<vue-ellipse-progress :progress="progress"/>
104+
<ve-progress :progress="progress"/>
94105
```
95106
The **[`progress`](#progress)** is the only required property. However, in order to create unique circles that match your design needs, you can use all the properties explained below.
96107

0 commit comments

Comments
 (0)