| layout | page |
|---|---|
| title | Getting Started |
| permalink | /getting-started/ |
| nav_order | 1 |
{% include fontawesome.html %} {% include ace.html %}
Install KyoML
With npm:
npm install --save kyomlWith yarn:
yarn add kyomlThe module exposes a compile method which takes in a KyoML string, and returns JSON
const kyoml = require('kyoml');
const json = kyoml.compile(`
# This is KyoML
block {
foo = 'bar'
}
`)Reading from a file
const kyoml = require('kyoml');
const fs = require('fs');
const json = kyoml.compile(
fs.readFileSync('./sample.kyo').toString()
)