Pas2js.cfg

This is an old revision of Pas2js.cfg, edited by Mattias2 at . The current revision is 132009.

/* Examples */

Locations

You can see where pas2js searches for its cfg file and what it finds using the command line parameter -vt.

On Unix (Linux, MacOS, BSD) pas2js searches

On Windows the compiler searches:

You can disable the search for the default config file using the parameter -n.

You can pass additional config files using the @ parameter. For example:

pas2js -n @/etc/pas2js.cfg

This will skip the default config file and parse /etc/pas2js.cfg.

Structure

Macros

You can see the supported macros running pas2js -h

Examples

Here is a typical pas2js.cfg file:

#
# Minimal config file for pas2js compiler
#
# -d is the same as #DEFINE
# -u is the same as #UNDEF
#
# Write always a nice logo ;)
-l

# Display Warnings, Notes and Hints
-vwnh
# If you don't want so much verbosity use
#-vw

# Allow C-operators
-Sc

#IFDEF FPC_SUBTARGET_NAMESPACED
-Fu$CfgDir/../../packages/*/*/namespaced
-Fi$CfgDir/../../packages/*/*/src
#else
-Fu$CfgDir/../../packages/*/*/src
#endif
-Fu/home/mattias/pascal/fpc_sources/3.3.1/utils/pas2js/dist/

#IFDEF nodejs
-Jirtl.js
#ENDIF

# Put all generated JavaScript into one file
-Jc

# end.