esdown is an ES6+ to ES5 compiler, written in ES6. It will allow you to write programs using next-generation Javascript features without having to wait for Node or browsers to fully implement them.
esdown can also be used as a runtime environment for executing ES6+ programs on top of Node.
You can demo esdown by using the browser REPL.
For more information:
Install globally with NPM (you may need to sudo
this):
Start a REPL by running it without any arguments:
Execute a module by adding a path:
Translate a module by using a hyphen:
esdown - src/main.js build/esdown.js -b -r
--input, -i (1) The file to translate.
--output, -o (2) The file to write to. If not set, then the output
will be written to the console.
--bundle, -b If present, module dependencies will be bundled
together in the output.
--global, -g If specified, the name of the global variable to
dump this module's exports into, if the resulting
script is not executed within any module system.
esdown can also be used as a library. First, install locally with NPM:
translate(input, options = {})Translates ES6+ code to ES5. The following options are defined:
true
, parse the input as a module. Otherwise, parse the input as a script. The default is false
.Example:
var esdown = require("esdown"); var output = esdown.translate("class C { foo() {} }", { module: true });
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4