Link Search Menu Expand Document

Getting Started

Adding to your project

Install KyoML

With npm:

npm install --save kyoml

With yarn:

yarn add kyoml

Using the compiler

The 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()
)