1 | # Amok(1)
|
2 | [![tips](https://img.shields.io/gratipay/caspervonb.svg?style=flat-square)](https://gratipay.com/caspervonb/)
|
3 | [![chat](https://img.shields.io/badge/gitter-join%20chat-green.svg?style=flat-square)](https://gitter.im/caspervonb/amok)
|
4 | [![npm](https://img.shields.io/npm/v/amok.svg?style=flat-square)](https://www.npmjs.org/package/amok)
|
5 |
|
6 | ## Synopsis
|
7 | ```sh
|
8 | amok [options] <script>
|
9 | ```
|
10 |
|
11 | ## Installation
|
12 | ```
|
13 | npm install amok -g
|
14 | ```
|
15 |
|
16 | ## Description
|
17 | Amok standalone command line tool for rapid prototyping and development of JavaScript applications.
|
18 |
|
19 | It monitors changes in the file system. As soon as you save a file, it is then preprocessed, compiled and bundled as needed, and re-compiled in the client session without refreshing or restarting the client.
|
20 |
|
21 | This re-compilation is done through a debugging session, unlike reloading or reevaluation, re-compilation leaves the application state intact, no side effects are executed when doing re-compilation.
|
22 |
|
23 | Additional features include a zero configuration http development server for developing front end applications, an interactive mode (read–eval–print loop) and console redirection.
|
24 |
|
25 | ## Options
|
26 | ```
|
27 | -h, --host <HOST>
|
28 | specify the http host, default HOST is localhost.
|
29 |
|
30 | -p, --port <PORT>
|
31 | specify the http port, default PORT is 9966.
|
32 |
|
33 | -H, --debugger-host <HOST>
|
34 | specify the remote debugger host, default HOST is localhost.
|
35 |
|
36 | -P, --debugger-port <PORT>
|
37 | specify the remote debugger port, default PORT is 9222.
|
38 |
|
39 | --client <identifier>
|
40 | specify the client to spawn
|
41 |
|
42 | --compiler <identifier>
|
43 | specify the compiler to spawn
|
44 |
|
45 | -i, --interactive
|
46 | start in interactive mode
|
47 |
|
48 | -v, --verbose
|
49 | enable verbose logging mode
|
50 | ```
|
51 |
|
52 | You must have a client already listening on the remote debugging port when launching, or specified via the `--client` option.
|
53 |
|
54 | Optionally a compiler may be specified to process script sources via the `--compiler` option,
|
55 | Any extra arguments and options following the option parsing terminator `--`, will be passed as extra options to the compiler. The specified compiler must have its executable available in `PATH`.
|
56 |
|
57 | ## Example
|
58 | 1. `git clone https://gist.github.com/d58c3eecb72ba3dd0846.git examples`
|
59 | 2. `cd examples`
|
60 | 3. `amok --client chrome canvas.js`
|
61 |
|
62 | ### Webpack
|
63 | `amok --client chrome --compiler webpack canvas.js`
|
64 |
|
65 | ### Browserify
|
66 | `amok --client chrome --compiler browserify canvas.js`
|
67 |
|
68 | ### Babel
|
69 | `amok --client chrome --compiler babel canvas.js`
|
70 |
|
71 | ### TypeScript
|
72 | `amok --client chrome --compiler typescript canvas.js`
|
73 |
|
74 | ### CoffeeScript
|
75 | `amok --client chrome --compiler coffeescript canvas.js`
|