CLI

$ kaoscript

Usage: kaoscript [options] <file>

Options:
  -V, --version                         output the version number
  -k, --clean                           remove compiler's cache files
  -c, --compile                         compile to JavaScript and save as .js files
      --no-header                       suppress the "Generated by" header
  -m, --metadata                        write the metadata file
  -o, --output <path>                   set the output directory for compiled JavaScript
  -p, --print                           print out the compiled JavaScript
      --no-register                     suppress "require(kaoscript/register)"
  -r, --rewire <src-path=gen-path,...>  rewire the references to source files to generated files
  -t, --target <engine>                 set the engine/runtime/browser to compile for
  -h, --help                            output usage information

execute

default

$ kaoscript index.ks

ES5

$ kaoscript --target ecma-v5 index.ks

ES6

$ kaoscript --target ecma-v6 index.ks

save as JavaScript

$ kaoscript -c index.ks
$ kaoscript -p index.ks

cleanup

The option -k or --clean remove all the cache files generated by the compiler wherever it's used alone or not.

$ kaoscript --clean