Amok(1)
Synopsis
amok [options] <script>
Description
Amok standalone command line tool for rapid prototyping and development of JavaScript applications.
It monitors changes in the file system. As soon as you save a file, it is then preprocessed, compiled and bundled as needed, and reloaded in the browser session without refreshing.
This is done through a debugging session, and keeps the application state unchanged while doing live edits.
Additional features include a zero configuration http development server, console redirection and code evaluation.
Example
export AMOK_BROWSER='google-chrome --remote-debugging-port=9222'
export AMOK_BUNDLER='watchify -o $@'
amok myapp.js
Options
-h, --host <HOST>
specify the http host, default HOST is localhost.
-p, --port <PORT>
specify the http port, default PORT is 9966.
-H, --debugger-host <HOST>
specify the remote debugger host, default HOST is localhost.
-P, --debugger-port <PORT>
specify the remote debugger port, default PORT is 9222.
-v, --verbose
enable verbose logging mode
--no-browser
disable browser spawning
--no-bundler
disable bundling
--no-debugger
disable remote debugger
Any extra arguments following the --
terminator, will be passed as arguments when spawning the compiler, if one is specified.
Environment Variables
These environment variables are used to provide amok with default values.
AMOK_BROWSER
When set to a executable, will be opened after the server has started.
AMOK_BUNDLER
When set to an executable, will be used to bundle scripts.
Automatic Variables
These automatic variables are set and substituted when spawning clients and compilers.
$@
When using a bundler, this is set to the output path of the bundle