Transpiler for ES6 to ES5 with no runtime component. The design goals of this project are:
harmony branch gives pretty good support, and if it turns out to be lacking, it can be patched.Non goals include:
In short, this gives you those helpful syntactic shortcuts without the bloat that often acompanies transpilers.
I am a ${"template"} stringclass Dog extends Animal { constructor() { super('Dog') }}var squares = [1, 2, 3, 4].map(x => x * x)Ironically not yield a this stage :(
npm install yieldify
To compile from the CLI you can use a number of methods:
$ yieldify input.js > output.js
$ yieldify < input.js > output.js
$ yieldify input.js output.js
$ yieldify input.js | uglify-js --minify > output.js
You can also compile an entire directory
$ yieldify input output
Individual files:
var compile = require('yieldify')
fs.writeFileSync('output.js', compile('input.js', fs.readFileSync('input.js', 'utf8')))
Entire direcotries:
var compile = require('yieldify')
compile.folder(input, output)
MIT