esparse-cl2

0.0.2 • Public • Published

Esparse-cl2

Javascript to/from JSON s-expressions to use with Chlorinate

Usage

echo 'var x = 0;' | esparse-cl2

{"type":"Program","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"x"},"init":{"type":"Literal","value":0}}],"kind":"var"}]}

echo '{"type":"Program","body":[{"type":"VariableDeclaration","declarations":[{"type":"VariableDeclarator","id":{"type":"Identifier","name":"x"},"init":{"type":"Literal","value":0}}],"kind":"var"}]}' | escodegen-cl2

var x = 0;

Command Line Options

escodgen-cl2 now takes some command line options to help you build source maps. The options are:

--js_ast

the path/file which contains the javascript parser api Abstract Syntax Tree which is normally piped into escodegen-cl2 (if this is omitted the input will be taken from stdin)

--js_output

the path/file to write the javascript out to

--source_file

the path/file to the original source which the source map maps back to

--source_map

the path/file to which the source map should be written out

The --source_file and --source_map options are not independent - if one is specified then the other must be as well

License: MIT

Readme

Keywords

none

Package Sidebar

Install

npm i esparse-cl2

Weekly Downloads

3

Version

0.0.2

License

none

Last publish

Collaborators

  • myguidingstar