File: options.wiki

package info (click to toggle)
js-of-ocaml 5.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 32,020 kB
  • sloc: ml: 91,250; javascript: 57,289; ansic: 315; makefile: 271; lisp: 23; sh: 6; perl: 4
file content (50 lines) | stat: -rw-r--r-- 3,075 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
= Main Command-Line options

|= Option name            |= Description                           |
| --version               | Display the version of the compiler    |
| -o <file>               | Set the output filename to <file>      |
| --source-map            | Generate sourcemap                     |
| --opt {1,2,3}           | Set the compilation profile
                            (default 1). See **Optimization**
                             section below.                        |
| --pretty                | Pretty print javascript output         |
| --target-env            | Build javascript for the requested
                            environment (default "isomorphic").
                            Isomorphic javascript runs in both the
                            browser & nodejs. "nodejs" & "browser"
                            options bundle less javascript, but
                            drop support for APIs incompatible with
                            the selected runtime.                  |
| --no-inline             | Disable code inlining                  |
| --debug-info            | Output debug information               |
| -I dir                  | Add <dir> to the list of
                            include directories                    |
| --file file[:target]    | Register <file> to the pseudo filesystem
                            and choose the destination <target>. The
			    <target> can be a directory or a file
			    (default /static/)                     |
| --enable <option>       | Enable option <option>                 |
| --disable <option>      | Disable option <option>                |

=Optimizations
 * For Debugging: "--pretty --no-inline --debug-info" + eventually "--disable staticeval --disable share"
 * For Production: "--opt 3". It minimize the generated javascript by applying
   various optimizations until a fix-point is reached
==List of option to "--disable" or "--enable"

|= Option name   |= Default |= Description                           |
| pretty         | false    | Pretty print the javascript output     |
| effects        | false    | Enable support for effect handlers     |
| debuginfo      | false    | Output debug information (location)    |
| deadcode       | true     | Deadcode elimination                   |
| globaldeadcode | true     | Global deadcode elimination            |
| inline         | true     | Code inlining                          |
| shortvar       | true     | Shorten variable names                 |
| staticeval     | true     | Static evaluation of constants         |
| share          | true     | Share string and number constants      |
| strict         | true     | Enable strict mode                     |
| debugger       | true     | Keep debugger statements.
                              Stripped otherwise                     |
| genprim        | true     | Generate dummy primitives when missing |
| excwrap        | true     | Wrap js exception into ocaml ones      |
| optcall        | true     | Javascript optimizations               |