1.1.5 • Published 6 years ago

moonc v1.1.5

Weekly downloads
10
License
-
Repository
-
Last release
6 years ago

moonc v1.1.5

Transpile a MoonScript file.

const moonc = require('moonc')

// moonc() returns a `ReadableStream` that emits transpiled code.
moonc('x = 1')
  .pipe(fs.createWriteStream('foo.lua'))
  .once('error', console.error)

// moonc.promise() resolves with the transpiled code.
let lua = await moonc.promise('x = 1')

// Both functions work with `ReadableStream` objects, too!
moonc(fs.createReadStream('foo.moon'))