JS_OF_OCAML-LINK(1)
π JS_OF_OCAML-LINK π
okay bestie, listen up β this is the Js_of_ocaml linker, straight out of the Js_of_ocaml Manual. It's the js_of_ocaml link command and she is iconic π
β¨ SYNOPSIS β¨
js_of_ocaml link [OPTION]β¦ [JS_FILES]β¦
π¦ DESCRIPTION π¦
So like, js_of_ocaml-link is a JavaScript linker. That's it, that's the job. She takes a bunch of JavaScript files and concatenates them into one β and the whole time she's keeping your sourcemap information intact. No cap. π«Ά
π ARGUMENTS π
JS_FILESβ the JavaScript files you want to link together. Just pass them, bestie. That's literally the assignment. π
π OPTIONS π
-aβ build a library (a.cma.jsfile) out of the js files (the.cmo.jsfiles) you dropped on the command line. It's givingocamlc -a, fr fr. π§--custom-header=VALβ give your generated JavaScript file a custom header. Lowkey the whole point is making your script executable with#!/usr/bin/env nodeπ--debug=SECTIONβ enable debug forSECTION. Turn it on, turn it up. π₯--debuginfo,--debug-infoβ output debug information. Two names, one vibe.--disable=OPTβ disable the optimizationOPT. Not today, optimization. π--empty-sourcemap,--empty-source-mapβ always generate empty source maps. Always. Periodt.--enable=OPTβ enable the optimizationOPT. Yes queen, optimize. β¨--linkallβ link all compilation units. Every single one. She's thorough.--no-sourcemap,--no-source-mapβ don't generate a source map at all. And heads up bestie β all other source map related flags will be ignored. Like, completely. π--noinline,--no-inlineβ disable inlining. Leave the functions where you found them. π-o FILEβ set the output file name toFILE. Name your baby. πΌ--prettyβ pretty print the output. Because your code deserves to look good. π-q,--quietβ suppress non-error messages. Shhh. Only the real problems get to speak. π€«--resolve-sourcemap-url=VAL (absent=false)β resolve the source map url. Note the default, bestie:absent=false.--source-map-inlineβ inline the sourcemap directly into the generated JavaScript. All up in there. π«Ά--source-map-root=VALβ the root dir for the source map. πΈ--sourcemap,--source-mapβ generate a source map. Yes. Do it. β--toplevelβ compile a toplevel. Main character behavior tbh. π-w WARNβ enable or disable the warnings specified by the argumentWARN. You're in charge of the warning situation. π--Werrorβ turn all warnings into errors. Every little warning? Now a whole error. Dramatic but valid. π
π COMMON OPTIONS π
--help[=FMT](default=auto) β show this help in the formatFMT. The valueFMTmust be one ofauto,pager,grofforplain. Withauto, the format ispagerorplainwhenever theTERMenv var isdumbor undefined. (iykyk π§)--versionβ show version information. The receipts, basically. π
π¦ EXIT STATUS π¦
js_of_ocaml link exits with:
0β on success. Slay. β¨123β on indiscriminate errors reported on standard error. π124β on command line parsing errors. You typed something weird bestie. π125β on unexpected internal errors (bugs). Not her fault, that's a bug. π
π BUGS π
Bugs are tracked on github at https://github.com/ocsigen/js_of_ocaml/issues. Go tell them, they want to know. π
π SEE ALSO π
π AUTHORS π
Jerome Vouillon, Hugo Heuzard. Legends, honestly. π«Ά
π LICENSE π
Copyright (C) 2010-2020.
js_of_ocaml is free software, you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, with linking exception; either version 2.1 of the License, or (at your option) any later version. β¨
okay that's the whole page bestie, go link some JavaScript, you got this π
signed, sealed, delivered β this was Js_of_ocaml 6.2.0, page JS_OF_OCAML-LINK(1), mwah π
π¦ where this page comes from
- ubuntu resolute: js-of-ocaml 6.2.0-2build6 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms