- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.2k
 
ch cli
        Doug Ilijev edited this page May 12, 2018 
        ·
        3 revisions
      
    The ch CLI is used for internal testing of ChakraCore but can be used as a standalone JS shell host with minimal capabilities. To facilitate testing, a few host capabilities beyond the scope of ECMAScript standard (e.g. loading files) are also provided in ch.
ch [-v|-version] [-h|-help|-?] <source file> [options]
- 
-argsand-endargsUsed to pass arguments to the script. They can be consumed using theWScript.Argumentsarray object. 
test.js:
console.log(WScript.Arguments[0])
console.log(WScript.Arguments[1])execution:
$ ch test.js -args hello world -endargs
hello
world
- 
WScript.LoadScriptFileLoads a JS script from the file system. It takes relative paths to CWD. 
For a complete and current list of available APIs, take a look at the WScriptJsrt::Initialize function
- Architecture Overview
 - Building ChakraCore
 - ChakraCore Code Structure
 - Contributor Guidance
 - Engineering Notes
 - Embedding ChakraCore
 - Testing ChakraCore
 - Getting ChakraCore binaries
 - Label Glossary
 - Resources
 - Roadmap / Release Notes
 
Want to contribute to this Wiki? Fork it and send a pull request!