The CLI package is a simple way for users to interact with some of the build/validation tooling. As new capabilities are added to the ecosystem, they may be exposed via this cli to use of use for developers.
Config
Config files are able to customize the behavior of the CLI commands without requiring args. Behavior specific to execution can leverage plugins, which can be composed together using presets. Full configs can also be shared using extensions.
To resolve a full configuration, the extension is taken as the base, the presets are applied in order, then local plugins.
The format is similar to eslint, babel and other .rc/json/js based approaches.
Config files are searched using cosmiconfig, which will look for:
a player property in package.json
a .playerrc file in JSON or YAML format
a .player.json, .playerrc.yaml, .playerrc.yml, .playerrc.js, or .playerrc.cjs file
a player.config.js or player.config.cjs CommonJS module exporting an object
Example:
Options defined via the CLI arguments will take precedence over the config files (for things that overlap).
Plugins
Plugins are the way to change runtime behavior of the CLI actions. This includes augmenting the behavior of the DSL compiler, language-service, and more.
Commands
player dsl compile
Compile Player DSL files into JSON after running TSC compiler against Typescript files
player dsl validate
Runs isolated TSC compiler on authored Player DSL Typescript files.