@gemini-game-engine/md-packer
Packs Markdown/CommonMark .md files with template definitions into one JSON file
Last updated 3 months ago by galeanne-thorn .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @gemini-game-engine/md-packer 
SYNC missed versions from official npm registry.

Gemini Game Engine - MD to JSON Packer

Packs Markdown/CommonMark .md files with front matter definitions, together with JSON .json and YAML .yaml files into one single JSON file.

The markdown part of the

Installation

npm install @gemini-game-engine/md-packer

Usage

CLI

npx @gemini-game-engine/md-packer <input-folder> [<output.json>]

Example

Assuming game folder has following structure:

+-+- game
  |- info.yaml
  |-+ rooms
  | |- kitchen.md
  | \- hallway.md
  |-+ scenes
    \- data.json

and content of kitchen.md is

---
type: room
id: kitchen
data:
  - 1
  - 2
---
Text for kitchen

and content of hallway.md is

---
type: room
id: hallway
data:
  - 3
---
Text for hallway

running the md-packer game game.json generates game.json file with following content:

{
  "info": {...},
  "rooms": {
    "kitchen": {
      "type": "room",
      "id": "kitchen",
      "data": [1 ,2],
      "ui": {
        "text": "Text for kitchen"
      }
    },
    "hallway": {
      "type": "room",
      "id": "hallway",
      "data": [3],
      "ui": {
        "text": "Text for hallway"
      }
    }
  },
  "scenes": {
    "data": {...}
  }
}

Current Tags

  • 1.1.1                                ...           latest (3 months ago)

4 Versions

  • 1.1.1                                ...           3 months ago
  • 1.1.0                                ...           3 months ago
  • 1.0.1                                ...           3 months ago
  • 1.0.0                                ...           3 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 4
Last Day 0
Last Week 4
Last Month 0
Dependencies (4)
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |