A simple tool that allows you to execute javascript in the command line as if you were in a browser. Built on-top of PhantomJS and acts as a well-behaved unix tool.
Wait, isn't this just NodeJS? No, they are for different things. BooJS gives you the full DOM, you can call document
in BooJS and import arbitrary browser javascript libraries.
#Setup
gem install boojs
boojs [-v file] [file]
The following options are available:
-v
- Verify that a file contains no javascript syntax errors. Returns 0 if there are no errors.
Open a standard headless javascript browser 'REPL'
(sh)>boojs
Execute a file first, then enter pipe mode (repl like)
(sh)>boojs code.js
Verify that a file contains no javascript errors
(sh)>boojs -v code.js
(sh)>echo $?
0
- Ruby 2.1 or Higher
- If you found a bug, submit a pull request.
- If you have a feature request, submit a pull request.
- If you want to contribute, submit a pull request.
When you need to test javascript code that needs to run in a browser but don't necessarily need to test the UI components.
Fittr is a SaaS company that focuses on providing personalized workouts and health information to individuals and corporations through phenomenal interfaces and algorithmic data-collection and processing.
boojs is released under the MIT license. See LICENSE for details.