-
Notifications
You must be signed in to change notification settings - Fork 1
Repository
Please refers to its software repository in order to get the instructions for installing, building or running the commands. You can find a list of available commands in repo/commands directory.
Additionally, default configurations for each environment can be stored in repo/configs directory.
Within each command directory, there can be found four different subdirectories, which can be one of the following:
Subdirectory | Description |
---|---|
install | Install instructions for the commands, using the package managers of each environment |
build | Build instructions for each platform, or environment |
prebuilt | Prebuilt, fetch and uncompress instructions for each environment |
script | JavaScript implementation of the commands |
Inside each of the above subdirectories, you may find files built for each platform, refer to "module resolution" section in order to learn more.
All installation, build, prebuilt and script files in the Please repo follow the same naming mechanism:
${os}.${variant}.${release}.${arch}
Where:
-
os
is the OS name, type, class or family (eg.windows
,macos
,bsd
,linux
orany
) -
variant
is the distribution, variant or version (eg.10
,ubuntu
,debian
,freebsd
orany
) -
release
is the subversion, release or build number (eg.18363
,20.04
,10
orany
) -
arch
is the cpu architecture (eg.arm64
,x64
, orany
)
Please first tries the exact values for each of the parameters, then switches to any
, one parameter at a time from right to left. The any
exchange order is as follows:
${os}.${variant}.${release}.${arch}
${os}.${variant}.${release}.any
${os}.${variant}.any.${arch}
${os}.${variant}.any.any
${os}.any.any.any
any.any.any.any
Each module, can either be a JavaScript file, or a subdirectory. If the module is a subdirectory, please expects an index.js
file in that directory as the entry point of the module. A package.json
file can be added to the module subdirectory, the dependencies listed in the package.json
file get installed before running the command.
Depending on the their functionality and use case, modules need to export a specific JavaScript function:
Functionality | Should export | Should expect arguments |
---|---|---|
install | install |
config |
build | build |
config |
prebuilt | prebuilt |
config |
script | run |
argv and config
|
Where:
-
config
argument, is the Please config file, parsed, all CLI overrides and flags included. -
argv
are the arguments passed to the command by the user.
Command | Module type | OS | Variant | Release | Arch | Description |
---|---|---|---|---|---|---|
reverse | Script (file) | Any | Any | Any | Any | A command that prints back the input in reverse |
download | Script (directory) | Any | Any | Any | Any | A command that downloads and saves a single file |
docker | Install (file) | Linux | Ubuntu | Any | x64 | Install file for Docker, Ubuntu specific |