Configurations
Configurations can be defined via a TOML file, it should be named as either Comonicon.toml or JuliaComonicon.toml under a Julia project project root directory.
References
Comonicon.Configs.Application — Type
ApplicationApplication build configurations.
Keywords
path: application build path, default is "build".incremental: set totrueto build incrementally, default istrue.filter_stdlibs: set totrueto filter out unused stdlibs, default isfalse.cpu_target: cpu target to build, default isPackageCompiler.default_app_cpu_target().precompile: precompile configurations, seePrecompile, default isPrecompile().c_driver_program: driver program.
Comonicon.Configs.Command — Type
CommandConfigs for Command execution.
Keywords
color: whether print with color in help page, default istrue.static: whether genrate help info at compile time, the format won't be adaptive to displaysize anymore, iftrue, default istrue.width: ifstatic=true,widthis used to set the static size of expected terminal.dash: whether parse--seperator, default istrue.plugin: parse<main CLI name>-<plugin>for CLI plugin, default isfalse.
Comonicon.Configs.Comonicon — Type
ComoniconBuild configurations for Comonicon. One can set this option via Comonicon.toml under the root path of a Julia project directory and read in using read_configs.
Keywords
name: required, the name of CLI file to install.command: configs for command parsing.install: installation options, see alsoInstall.sysimg: system image build options, see alsoSysImg.download: download options, see alsoDownload.application: application build options, see alsoApplication.
Comonicon.Configs.Download — Type
DownloadDownload information.
Keywords
host: where are the tarballs hosted, default is "github.com"user: required, user name on the host.repo: required, repo name on the host.
Comonicon.Configs.Install — Type
InstallInstallation configurations.
Keywords
path: installation path.completion: set totrueto install shell auto-completion scripts.quiet: print logs or not, default isfalse.compile: julia compiler option for CLIs if not built as standalone application, default is "min". See help section ofjulia --compilefor more details.optimize: julia compiler option for CLIs if not built as standalone application, default is2. See help section ofjulia --optimizefor more details.nthreads: julia compiler option for CLIs if not built as standalone application, default is1.
Comonicon.Configs.Precompile — Type
PrecompilePrecompilation files for PackageCompiler.
Keywords
execution_file: precompile execution file.statements_file: precompile statements file.
Comonicon.Configs.SysImg — Type
SysImgSystem image build configurations.
Keywords
path: system image path to generate into, default is "deps/lib".incremental: set totrueto build incrementally, default istrue.filter_stdlibs: set totrueto filter out unused stdlibs, default isfalse.cpu_target: cpu target to build, default isPackageCompiler.default_app_cpu_target().precompile: precompile configurations, seePrecompile, default isPrecompile().
Comonicon.Configs.find_comonicon_toml — Function
find_comonicon_toml(path::String, files=["Comonicon.toml", "JuliaComonicon.toml"])Find Comonicon.toml or JuliaComonicon.toml in given path.
Comonicon.Configs.read_options — Method
read_options(comonicon; kwargs...)Read in Comonicon build options. The argument comonicon can be:
- a module of a Comonicon CLI project.
- a path to a Comonicon CLI project that contains either
JuliaComonicon.tomlorComonicon.toml. - a path to a Comonicon CLI build configuration file named either
JuliaComonicon.tomlorComonicon.toml.
In some cases, you might want to change the configuration written in the TOML file temporarily, e.g for writing build tests etc. In this case, you can modify the configuration using corresponding keyword arguments.
keyword arguments of Application and SysImg are the same, thus keys like filter_stdlibs are considered ambiguous in read_options, but you can specifiy them by specifiy the specific Application or SysImg object, e.g
read_options(MyCLI; sysimg=SysImg(filter_stdlibs=false))See also Comonicon, Install, SysImg, Application, Download, Precompile.
Comonicon.Configs.read_toml — Method
read_toml(mod::Module)Read Comonicon.toml or JuliaComonicon.toml in given module's project path.
Comonicon.Configs.read_toml — Method
read_toml(path::String)Read Comonicon.toml or JuliaComonicon.toml in given path.