https://github.com/egorprnn/RawJSONBuilder
📦 Minecraft Raw JSON text builder
https://github.com/egorprnn/RawJSONBuilder
json minecraft raw
Last synced: over 1 year ago
JSON representation
📦 Minecraft Raw JSON text builder
- Host: GitHub
- URL: https://github.com/egorprnn/RawJSONBuilder
- Owner: MrZillaGold
- License: mit
- Created: 2021-02-19T12:30:39.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-04T20:22:44.000Z (over 2 years ago)
- Last Synced: 2024-10-19T22:09:04.833Z (over 1 year ago)
- Topics: json, minecraft, raw
- Language: TypeScript
- Homepage: https://npmjs.com/package/rawjsonbuilder
- Size: 1.98 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
RawJSONBuilder
📦 Minecraft Raw JSON text builder.
| 📖 [Documentation](https://mrzillagold.github.io/RawJSONBuilder/index.html) |
| ---------------------------------------------------------------- |
### Install 📦
`npm i rawjsonbuilder`
## Usage 🔧
```js
import { text, TextComponent } from "rawjsonbuilder"; // ESM
// OR
const { text, TextComponent } = require("rawjsonbuilder"); // CommonJS
text("Hello World!", "black")
.toRawString(); // §0Hello World!
const builder = new TextComponent()
.setText("Hello World!")
.setBold()
.addSpace()
.addExtra(
text("Nice to meet you!", "red")
)
.toRawString(); // §lHello World! §cNice to meet you!
```