Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nailujx86 authored Nov 6, 2020
1 parent 8233fe5 commit 7c44e51
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

Supports parsing old and new format motds to HTML and parsing old format motds to new JSON format motds.

Usage NodeJS:
Usage NodeJS:
Install from npm (see https://www.npmjs.com/package/mcmotdparser):
`npm install motdparser`
```javascript
const motdparser = require('mcmotdparser');
var motd = "§aSuper cool Server §7Come join us! §e§lNEW GAME:§b§l THE BRIDGE";
Expand All @@ -16,7 +18,7 @@ Usage Web:

```javascript
// Include this tag in your head or below your body
<script src="https://cdn.jsdelivr.net/gh/nailujx86/mcmotdparser@Build_22/dist/motdparserweb.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/gh/nailujx86/mcmotdparser@master/dist/motdparserweb.js" type="text/javascript"></script>

<script>
var motd = "§aSuper cool Server §7Come join us! §e§lNEW GAME:§b§l THE BRIDGE";
Expand All @@ -28,7 +30,7 @@ Usage Web:
```
To convert a "text" style motd to a modern json motd one can use ```motdParser.textToJson("motdtext", callback);```

The CSS File which helps styling the output are in the ```dist/``` Folder and on <https://cdn.jsdelivr.net/gh/nailujx86/mcmotdparser@Build_22/dist/mcmotd.css>.
The CSS File which helps styling the output are in the ```dist/``` Folder and on <https://cdn.jsdelivr.net/gh/nailujx86/mcmotdparser@master/dist/mcmotd.css>.
Parsing is supported for motds in text format as well as motds in the Minecraft Json-Text Format.

### Renders:
Expand All @@ -42,6 +44,6 @@ And one last example:
### Size (gipped):
| File | Size |
| ---- | ---- |
| motdparserweb.js.gz | 941 bytes |
| motdparserweb.js.gz | 1424 bytes |
| mcmotd.css.gz | 491 bytes |
=> 1.4 kB all together
=> 1.9 kB all together

0 comments on commit 7c44e51

Please sign in to comment.