0.1.0 • Published 8 years ago
quintessence-compiler v0.1.0
quintessence-compiler
This compiles card definitions written in Quintessence Card Definition Language to JSON.
Use
npm install --save quintessence-compilerimport { compileMultiDefToJSON } from 'quintessence-compiler'Example
import { compileMultiDefToJSON } from 'quintessence-compiler'
import fs from 'fs'
fs.readFile('myCard.txt', 'utf8', (error, sourceCode) => {
if (error) {
throw error
}
const json = compileMultiDefToJSON(sourceCode)
const jsonString = JSON.stringify(json)
fs.writeFile('myCard.json', jsonString, 'utf8', (error) => {
if (error) {
throw error
}
})
})0.1.0
8 years ago