Skip to content

Commit 7a0bf64

Browse files
committed
Added simple example of usage
1 parent 17f5b0e commit 7a0bf64

File tree

12 files changed

+12006
-8
lines changed

12 files changed

+12006
-8
lines changed

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,20 @@ $ npm run build
201201

202202
```
203203

204-
### Run demo locally
204+
### Run demo locally
205+
205206
``` bash
206-
# Run demo at localhost:8080
207-
$ npm link
208-
$ cd examples
209-
$ npm install
210-
$ npm link vue-vis-network
211-
# serve with hot reload at localhost:8080
212-
$ npm run dev
207+
# install vue-vis-network local module
208+
cd ..
209+
npm link
210+
# prepare example
211+
cd example
212+
# install the example dependencies
213+
npm install
214+
# add local vue-vis-network module to node_modules
215+
npm link vue-vis-network
216+
# run demo server
217+
npm run serve
213218
```
214219
Go to <http://localhost:8080/> to see running examples
215220

example/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Vue Vis-Network integration example
2+
3+
> An example project integrating Vue and vis-network
4+
5+
## Project setup
6+
``` bash
7+
# install vue-vis-network local module
8+
cd ..
9+
npm link
10+
# prepare example
11+
cd example
12+
# install the example dependencies
13+
npm install
14+
# add local vue-vis-network module to node_modules
15+
npm link vue-vis-network
16+
```
17+
18+
### Live Demo
19+
```
20+
npm run serve
21+
```
22+
23+
Go to <http://localhost:8080/> to see an example running
24+
25+
NOTE: If you make changes to the library you should run `npm run build` again in the root folder to rebuild vue-vis-network package.
26+
The dev server should detect modification and reload the demo
27+

example/babel.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/app'
4+
]
5+
}

0 commit comments

Comments
 (0)