Skip to content

Commit 490ec15

Browse files
Update the documentation
Add an 'Examples' chapter which details how to build and run them. Modify the case of the import in the webpack configuration. Signed-off-by: Alexandre Bonneau <alexandre.bonneau@linuxfr.eu>
1 parent ebac8db commit 490ec15

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ vue-autoNumeric wraps the awesome AutoNumeric library and generate an `<input>`
1616

1717
**Checkout the [demo](https://codepen.io/AnotherLinuxUser/pen/pWgOrZ?editors=1010)!**
1818

19+
Alternatively you can check the [examples](#Examples) directly in your browser to see how to integrate the component with Vue and AutoNumeric.
20+
1921
### Installation
2022

2123
```sh
@@ -46,7 +48,7 @@ module.exports = {
4648
filename: './dist/bundle.js'
4749
},
4850
externals: {
49-
AutoNumeric: 'AutoNumeric',
51+
autonumeric: 'AutoNumeric',
5052
},
5153
};
5254
```
@@ -185,7 +187,17 @@ The official AutoNumeric [documentation](http://autonumeric.org/#/guide) is usin
185187
<br>
186188
An editable live example is available [on Codepen](https://codepen.io/AnotherLinuxUser/pen/pWgOrZ?editors=1010).
187189

188-
Moreover, you can check the [shipped examples](https://github.com/autoNumeric/vue-autoNumeric/blob/master/examples/index.html) in your browser, and study its [source here](https://github.com/autoNumeric/vue-autoNumeric/tree/master/examples-src).
190+
#### Examples
191+
192+
You can also check the [shipped examples](https://github.com/autoNumeric/vue-autoNumeric/blob/master/examples/index.html) in your browser, and study their [source here](https://github.com/autoNumeric/vue-autoNumeric/tree/master/examples-src).<br>To do so, first compile the example using:
193+
```bash
194+
# this will build the component *and* the examples
195+
yarn build
196+
```
197+
Then check the resulting html file in your browser using:
198+
```bash
199+
firefox ./examples/index.html # or `chrome`
200+
```
189201

190202
### Requirements
191203

0 commit comments

Comments
 (0)