Skip to content

Commit 05b9f69

Browse files
committed
update publish package config
1 parent 070687a commit 05b9f69

File tree

2 files changed

+28
-19
lines changed

2 files changed

+28
-19
lines changed

README.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
77
- [Basic usage]()
88
- Document - comming soon
99

10-
1110
## Installation
11+
1212
- Install from npm
1313

14-
`yarn add mintree`
14+
`yarn add @bluzky/mindtree`
1515

1616
- Add to your project assets
17-
Just copy `mindtree.js` to your assets directory
17+
Just copy `mindtree.js` to your assets directory
1818

1919
## Basic usage
20+
2021
You have to follow these steps to render a mindmap:
22+
2123
1. Build mind map data represented as a hierarchy tree
2224
2. Which layout you want to render as
2325
3. Build a `Mindmap` object from `data` and `layout`
@@ -26,11 +28,11 @@ You have to follow these steps to render a mindmap:
2628
### 1. Vanilla javascript
2729

2830
Add this to your html
31+
2932
```html
3033
<script src="mindtree.js"></script>
3134
```
3235

33-
3436
```javascript
3537
var text = `
3638
Root
@@ -57,7 +59,7 @@ Root
5759
// parse indented text to hierarchy tree
5860
var data = mindtree.Parsers.TextParser.parse(text);
5961
// choose a layout
60-
var MindmapLayout = mindtree.MindmapLayouts.Standard;
62+
var MindmapLayout = mindtree.MindmapLayouts.Standard;
6163

6264
// build Mindmap object
6365
var mindMap = new mindtree.MindMap(data.root, MindmapLayout, {});
@@ -69,32 +71,28 @@ viewer.render(mindMap);
6971
```
7072

7173
### 2. With ES6
74+
7275
Import required classes
7376

7477
```javascript
75-
import {MindMap, Viewer, Parsers, MindmapLayout} from 'mindtree'
78+
import { MindMap, Viewer, Parsers, MindmapLayout } from "mindtree";
7679
```
7780

7881
And then follows the same steps as above
79-
8082

8183
## Features
8284

83-
- **Parser**
84-
- Indented text
85-
86-
- **Layout**
87-
- Standard
88-
- RightLogical
89-
- DownwardOrganizational
90-
- UpwardOrganizational
91-
- LeftLogical
85+
- **Parser** - Indented text
9286

87+
- **Layout** - Standard - RightLogical
88+
- DownwardOrganizational
89+
- UpwardOrganizational
90+
- LeftLogical
9391

9492
## Credits
95-
- Thanks [leungwensen](https://github.com/leungwensen), This library is inspired by his repo [Mindmap layouts](https://github.com/leungwensen/mindmap-layouts). And I still copy the layout code from his source
93+
94+
- Thanks [leungwensen](https://github.com/leungwensen), This library is inspired by his repo [Mindmap layouts](https://github.com/leungwensen/mindmap-layouts). And I still copy the layout code from his source
9695

9796
- Thanks @stetrevor for his library [non-layered-tidy-tree-layout](https://github.com/stetrevor/non-layered-tidy-tree-layout)
9897

9998
- This project use [two.js](https://two.js.org/) for the rendering mindmap.
100-

package.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
{
22
"name": "@bluzky/mindtree",
3-
"version": "1.0.0",
3+
"version": "1.0.2",
44
"private": false,
55
"description": "Mindmap viewer for web",
6+
"license": "MIT",
7+
"author": "Daniel Nguyen <bluesky.1289@gmail.com>",
8+
"repository": "github:bluzky/mindtree",
69
"main": "dist/js/mindtree.js",
10+
"files": [
11+
"dist/",
12+
"src/",
13+
"index.html",
14+
"LICENSE",
15+
"README.md",
16+
"example"
17+
],
718
"scripts": {
819
"watch": "webpack --watch --progress --mode development",
920
"start": "webpack-dev-server",

0 commit comments

Comments
 (0)