Skip to content

Commit dcf084b

Browse files
committed
docs: update README
1 parent 15257dc commit dcf084b

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,19 @@ This javascript module aims at providing an easy interface in order to represent
99

1010
## Installation
1111

12-
With npm : `npm install treeviz`
12+
With npm :
1313

14-
and then you can use it with : `import {Treeviz} from 'treeviz';`
14+
```Bash
15+
npm install treeviz
16+
```
17+
18+
and then you can use it with :
19+
20+
```JavaScript
21+
import {Treeviz} from 'treeviz';
22+
```
1523

16-
Or download this repository and link the dist/index.js file in your page directly : `<script src="./dist/index.js><script>`
17-
Also, but not recommended, you can use : `<script src="https://rawgit.com/PierreCapo/treeviz/master/dist/index.js"></script>`
24+
Or download this zip repository in the Github Release section and link the dist/treeviz.js file in your page directly : `<script src="./dist/index.js><script>`
1825

1926
## Usage
2027

@@ -116,6 +123,14 @@ The table below lists all the avalaible key that the config object can have
116123
| `marginLeft` | number | 1.25 | Set the margin between the SVG element and the tree |
117124
| `marginRight` | number | 1.25 | Set the margin between the SVG element and the tree |
118125
| `duration` | number | 600 | The duration of the animation transition between layouts |
126+
127+
## Contributing
128+
129+
- Clone the repo.
130+
- Run `npm install`.
131+
- Run `npm run dev`, then you can edit the files in the `./src` folder and the `./example/index.html` file.
132+
- To publish (admin rights), run `npm run build && npm publish`.
133+
119134
## Credits
120135

121136
This module is based on d3 library, credit to all the contributors of this project.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"scripts": {
2323
"dev": "vite",
2424
"build": "tsc && vite build",
25-
"deploy": "tsc && vite build && npm publish",
2625
"preview": "vite preview"
2726
},
2827
"devDependencies": {

0 commit comments

Comments
 (0)