.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. .TH PAS2JS-3.2.2 "1" "January 2024" "pas2js-3.2.2 " "Free Pascal Compiler" .SH NAME pas2js-3.2.2 \- Pascal to JavaScript translator based on Free Pascal Compiler (FPC) .SH SYNOPSIS .B pas2js-3.2.2 \fI\,\/\fR .SH DESCRIPTION Pas2JS Compiler version 1.5.1 [2024/01/05] for Linux x86_64 Copyright \(co 2019 Free Pascal team. .SH OPTIONS Put + after a boolean switch option to enable it, \- to disable it .TP @ : Read compiler options from file in addition to the default .IP pas2js.cfg .TP \fB\-B\fR : Rebuild all .TP \fB\-d\fR : Defines the symbol . Optional: \fB\-d\fR:= .TP \fB\-i\fR : Write information and halt. is a combination of the following: .TP \fB\-iD\fR : Write compiler date .HP \fB\-iSO\fR : Write compiler OS .HP \fB\-iSP\fR : Write compiler host processor .HP \fB\-iTO\fR : Write target platform .HP \fB\-iTP\fR : Write target processor .TP \fB\-iV\fR : Write short compiler version .TP \fB\-iW\fR : Write full compiler version .TP \fB\-ic\fR : Write list of supported JS processors usable by \fB\-P\fR .TP \fB\-im\fR : Write list of supported modeswitches usable by \fB\-M\fR .TP \fB\-io\fR : Write list of supported optimizations usable by \fB\-Oo\fR .TP \fB\-it\fR : Write list of supported targets usable by \fB\-T\fR .TP \fB\-iJ\fR : Write list of supported JavaScript identifiers \fB\-JoRTL\-\fR .TP \fB\-C\fR : Code generation options. is a combination of the following .IP letters: .TP o : Overflow checking of integer operations .TP r : Range checking .TP R : Object checks. Verify method calls and object type casts. .TP \fB\-F\fR... Set file names and paths: .HP \fB\-Fe\fR: Redirect output to file . UTF\-8 encoded. .HP \fB\-FE\fR: Set main output path to .HP \fB\-Fi\fR: Add to include paths .HP \fB\-FN\fR: add to namespaces. Namespaces with trailing \- are removed. .IP Delphi calls this flag "unit scope names". .HP \fB\-Fu\fR: Add to unit paths .HP \fB\-FU\fR: Set unit output path to .TP \fB\-I\fR : Add to include paths, same as \fB\-Fi\fR .TP \fB\-J\fR... Extra options of pas2js .TP \fB\-Jc\fR : Write all JavaScript concatenated into the output file .HP \fB\-Je\fR: Encode messages as . .HP \fB\-Jeconsole\fR: Console codepage. This is the default. .HP \fB\-Jesystem\fR : System codepage. On non Windows console and system are the .IP same. .TP \fB\-Jeutf\-8\fR : Unicode UTF\-8. Default when using \fB\-Fe\fR. .TP \fB\-JeJSON\fR : Output compiler messages as JSON. Logo etc are outputted .IP as\-is. .HP \fB\-Ji\fR: Insert JS file into main JS file. E.g. \fB\-Jirtl\fR.js. Can be given .IP multiple times. To remove a file name append a minus, e.g. \fB\-Jirtl\fR.js\-. .TP \fB\-Jl\fR : lower case identifiers .TP \fB\-Jm\fR : generate source maps .HP \fB\-Jmsourceroot=\fR: use x as "sourceRoot", prefix URL for source file .IP names. .HP \fB\-Jmbasedir=\fR: write source file names relative to directory x, default .IP is map file folder. .HP \fB\-Jminclude\fR: include Pascal sources in source map. .HP \fB\-Jmabsolute\fR: store absolute filenames, not relative. .HP \fB\-Jmxssiheader\fR: start source map with XSSI protection )]}', default. .HP \fB\-Jm\-\fR: disable generating source maps .HP \fB\-Jo\fR: Enable or disable extra option. The x is case insensitive: .HP \fB\-JoSearchLikeFPC\fR: search source files like FPC, default: search case .IP insensitive. .HP \fB\-JoUseStrict\fR: add "use strict" to modules, default. .HP \fB\-JoCheckVersion\-\fR: do not add rtl version check, default. .HP \fB\-JoCheckVersion\fR=\fI\,main\/\fR: insert rtl version check into main. .HP \fB\-JoCheckVersion\fR=\fI\,system\/\fR: insert rtl version check into system unit init. .HP \fB\-JoCheckVersion\fR=\fI\,unit\/\fR: insert rtl version check into every unit init. .HP \fB\-JoRTL\-\fR=: set RTL identifier y to value z. See \fB\-iJ\fR. .HP \fB\-Jr\fR Control writing of resource string file .HP \fB\-Jrnone\fR: Do not write resource string file .HP \fB\-Jrunit\fR: Write resource string file per unit with all resource strings .HP \fB\-Jrprogram\fR: Write resource string file per program with all used .IP resource strings in program .HP \fB\-Jr\fR Control writing of linked resources .HP \fB\-JRnone\fR: Do not write resources .HP \fB\-JRjs\fR: Write resources in Javascript structure .HP \fB\-JRhtml\fR[=\fI\,filename\/\fR] : Write resources as preload links in HTML file .IP (default is projectfile\-res.html) .HP \fB\-Jpcmd\fR: Run postprocessor. For each generated js execute command .IP passing the js as stdin and read the new js from stdout. This option can be added multiple times to call several postprocessors in succession. .HP \fB\-Ju\fR: Add to foreign unit paths. Foreign units are not compiled. .HP \fB\-JU\fR: This pas2js does not support PCU files .TP \fB\-l\fR : Write logo .TP \fB\-M\fR : Set language mode or enable/disable a modeswitch .HP \fB\-MDelphi\fR: Delphi 7 compatibility mode .HP \fB\-MObjFPC\fR: FPC's Object Pascal compatibility mode (default) .TP \fB\-M\fR : enable or disable modeswitch, see option \fB\-im\fR .IP Each mode (as listed above) enables its default set of modeswitches. Other modeswitches are disabled and need to be enabled one by another. .HP \fB\-NS\fR : obsolete: add to namespaces. Same as \fB\-FN\fR .TP \fB\-n\fR : Do not read the default config files .TP \fB\-o\fR : Change main JavaScript file to , "." means stdout .TP \fB\-O\fR : Optimizations: .TP \fB\-O\-\fR : Disable optimizations .TP \fB\-O1\fR : Level 1 optimizations (quick and debugger friendly) .HP \fB\-Oo\fR: Enable or disable optimization. The x is case insensitive: .HP \fB\-OoEnumNumbers[\-]\fR: write enum value as number instead of name. Default .IP in \fB\-O1\fR. .HP \fB\-OoRemoveNotUsedPrivates[\-]\fR: Default is enabled .HP \fB\-OoRemoveNotUsedDeclarations[\-]\fR: Default enabled for programs with \fB\-Jc\fR .TP \fB\-P\fR : Set target processor. Case insensitive: .HP \fB\-Pecmascript5\fR: default .HP \fB\-Pecmascript6\fR .TP \fB\-S\fR : Syntax options. is a combination of the following letters: .TP 2 : Same as \fB\-Mobjfpc\fR (default) .TP a : Turn on assertions .TP c : Support operators like C (*=,+=,/= and \fB\-=\fR) .TP d : Same as \fB\-Mdelphi\fR .TP j : Allows typed constants to be writeable (default) .TP m : Enables macro replacements .TP \fB\-SI\fR : Set interface style to .TP \fB\-SIcom\fR : COM, reference counted interface (default) .HP \fB\-SIcorba\fR: CORBA interface .TP \fB\-T\fR : Set target platform .HP \fB\-Tbrowser\fR: default .HP \fB\-Tnodejs\fR : add pas.run(), includes \fB\-Jc\fR .TP \fB\-u\fR : Undefines the symbol .TP \fB\-v\fR : Be verbose. is a combination of the following letters: .TP e : Show errors (default) .TP w : Show warnings .TP n : Show notes .TP h : Show hints .TP i : Show info .TP l : Show line numbers, needs \fB\-vi\fR .TP a : Show everything .TP 0 : Show nothing (except errors) .TP b : Show file names with full path .TP c : Show conditionals .TP t : Show tried/used files .TP d : Show debug notes and info, enables \fB\-vni\fR .TP q : Show message numbers .TP x : Show used tools .TP v : Write pas2jsdebug.log with lots of debugging info .TP z : Write messages to stderr, \fB\-o\fR. still uses stdout. .HP \fB\-vm\fR,: Do not show messages numbered and . .TP \-? : Show this help .TP \fB\-h\fR : Show this help .PP Environment variable PAS2JS_OPTS is parsed after default config and before .IP command line parameters. .PP Macros: Format is $Name, $Name$ or $Name() .IP $Pas2jsFullVersion: major.minor.release $Pas2jsVersion: major.minor.release $CfgDir: Use within a config file. The directory of this config file $Env(): environment variable, e.g. $Env(HOME) .SH "SEE ALSO" The full documentation for .B pas2js-3.2.2 is maintained as a Texinfo manual. If the .B info and .B pas2js-3.2.2 programs are properly installed at your site, the command .IP .B info pas2js-3.2.2 .PP should give you access to the complete manual.