Skip to content

chlorinejs/esparse-cl2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

part of Chlorinate, the nodejs side

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published