Skip to content

Commit d2e7077

Browse files
committed
更新 README,介紹頁。
1 parent 716f9b7 commit d2e7077

File tree

6 files changed

+64
-7
lines changed

6 files changed

+64
-7
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,37 @@
66
[![download](https://img.shields.io/npm/dm/@pardnchiu/nanojson)](https://www.npmjs.com/package/@pardnchiu/nanojson)
77
[![jsdeliver](https://img.shields.io/jsdelivr/npm/hm/@pardnchiu/nanojson)](https://www.jsdelivr.com/package/npm/@pardnchiu/nanojson)
88

9+
## Installation
10+
11+
### Install via npm
12+
```bash
13+
npm i @pardnchiu/nanojson
14+
```
15+
16+
### Include via CDN
17+
18+
#### UMD version
19+
```html
20+
<script src="https://cdn.jsdelivr.net/npm/@pardnchiu/nanojson@[VERSION]/dist/NanoJSON.js"></script>
21+
```
22+
23+
#### ES Module version
24+
```javascript
25+
import { JSONEditor } from "https://cdn.jsdelivr.net/npm/@pardnchiu/nanojson@[VERSION]/dist/NanoJSON.esm.js";
26+
```
27+
28+
## How to use
29+
30+
### Initialize `JSONEditor`
31+
```Javascript
32+
let dom = new JSONEditor({
33+
id: "JSON-editor", // Element to replace
34+
// title: "", // Editor Title
35+
// description: "", // Editor Description
36+
// fill: 1 // Adjust size to parent element, default: 1 | true
37+
});
38+
```
39+
940
## License
1041

1142
Similar to MIT License but provides obfuscated code only:

dist/NanoJSON.esm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)