sg-compiler
v1.0.5
Published
Javascript compiler for sugos
Downloads
1
Readme
sg-compiler
Javascript compiler for sugos
Installation
$ npm install sg-compiler --save
Usage
'use strict'
const sgCompiler = require('sg-compiler')
const co = require('co')
// Compile es6 script
co(function * () {
let compiler = sgCompiler()
let compiled = yield compiler.compile(`
let {foo, bar} = { foo: 'this is foo', bar: 'This is bar' }
console.log(foo, bar)
`)
console.log(compiled) // es5 script
})
License
This software is released under the Apache-2.0 License.