File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,9 @@ import { program } from "commander";
2727import { readFileSync , writeFileSync } from "fs" ;
2828
2929program
30- . description ( "Compile .js to .astx" )
30+
3131 . command ( "compile <input> <output>" )
32+ . description ( "Compile .js to .astx" )
3233 . action ( ( input , output ) => {
3334 console . log ( "Compiling..." ) ;
3435
@@ -51,8 +52,9 @@ program
5152 } ) ;
5253
5354program
54- . description ( "Run .astx files" )
55+
5556 . command ( "run <input>" )
57+ . description ( "Run .astx files" )
5658 . action ( ( input ) => {
5759 console . log ( "Running..." ) ;
5860
@@ -63,10 +65,11 @@ program
6365 } ) ;
6466
6567program
68+
69+ . command ( "gen <input> <output>" )
6670 . description (
6771 "Generate .js code from .astx files (For debugging - code is not optimized or human readable)"
6872 )
69- . command ( "gen <input> <output>" )
7073 . action ( ( input , output ) => {
7174 console . log ( "Loading .astx file..." ) ;
7275
@@ -80,10 +83,11 @@ program
8083 } ) ;
8184
8285program
86+
87+ . command ( "version" )
8388 . description (
8489 "Show the version of the runtime and the astx/lib that includes the compiler"
8590 )
86- . command ( "version" )
8791 . action ( ( ) => {
8892 console . log ( `Runtime: ${ process . env . npm_package_version || "Unknown" } ` ) ;
8993 console . log ( `Compiler: ${ require ( "@astx/lib/package.json" ) . version } ` ) ;
You can’t perform that action at this time.
0 commit comments