Skip to content

Commit

Permalink
docs: udpate cli help (#82)
Browse files Browse the repository at this point in the history
Co-authored-by: Yago Crispim <[email protected]>
  • Loading branch information
YagoCrispim and Yago Crispim authored Sep 25, 2024
1 parent a8f6e44 commit 6435333
Showing 1 changed file with 32 additions and 12 deletions.
44 changes: 32 additions & 12 deletions src/cli/commands/info.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
local help_message = "Available commands:\n"
.."- run: Executes the specified core. If no core is specified, defaults to 'love'.\n"
.."- init: create standard structure for project in gly-engine.\n"
.."- meta: Displays metadata for the current game.\n"
.."- build: Builds the game and prepares it for distribution.\n"
.."- bundler: Builds the game using the bundler.\n"
.."- compiler: translate lua source to bytecode. (specific uses)\n"
.."- cli-test: Runs tests located in the './tests' directory.\n"
.."- cli-dump: extract source code (when bootstrapped).\n"
.."- cli-build: bootstrap from the CLI as a single file.\n"
.."- fs-replace: pattern-matching lua text transformer.\n"
.."- init: Initializes a new game project. Requires a game path.\n"
.."- build: Builds the game for distribution. Defaults to the 'ginga' core.\n"
.."- run: Executes the specified game. Defaults to the 'love' core.\n"
.."- meta: Displays metadata for the specified game.\n"
.."- bundler: Builds the game using the specified bundler file.\n"
.."- compiler: Compiles the specified file into an executable.\n"
.."- tool-love-zip: Creates a zip file for the specified path.\n"
.."- tool-love-exe: Creates an executable for the specified file.\n"
.."- fs-replace: Replaces content in a file with specified format and replacement.\n"
.."- fs-download: Downloads a file from the specified URL to the specified directory.\n"
.."- cli-build: Bootstrap the CLI as a single file\n"
.."- cli-test: Runs tests with optional coverage.\n"
.."- cli-dump: Extract source code (when bootstrapped).\n"
.."- version: Displays the current version of the tool.\n"
.."- help: Displays this help message.\n"
.."\n"
.."Available cores:\n"
.."- repl: Runs the REPL core.\n"
Expand All @@ -21,8 +26,23 @@ local help_message = "Available commands:\n"
.."- nintendo_wii: Builds for the Nintendo Wii.\n"
.."\n"
.."Usage:\n"
.."- To run a command, use: ./cli.sh <command> <game_path> -".."-core <core_name> [options]\n"
.."- For example: ./cli.sh build ./examples/asteroids/game.lua -".."-core ginga"
.."- To run a command, use: ./cli.sh <command> <game_path> [options]\n"
.."- Example: ./cli.sh build ./examples/asteroids/game.lua " .. "-" .. "-core ginga\n"
.."\n"
.."Available options:\n"
.."-" .. "-dist <path>: Specifies the distribution directory (default: './dist/').\n"
.."-" .. "-core <core_name>: Specifies the core to use (default varies by command).\n"
.."-" .. "-screen <resolution>: Specifies the screen resolution (default: '1280x720').\n"
.."-" .. "-bundler: Indicates to use the bundler during the build process.\n"
.."-" .. "-run: Indicates to run the game after building.\n"
.."-" .. "-format <format>: Specifies the format for metadata display.\n"
.."-" .. "-coverage: Enables coverage reporting for tests.\n"
.."\n"
.."Examples:\n"
.."- To initialize a new game: ./cli.sh init ./my_game\n"
.."- To build a game: ./cli.sh build ./examples/asteroids/game.lua " .. "-" .. "-core html5\n"
.."- To run a game: ./cli.sh run ./examples/asteroids/game.lua " .. "-" .. "-core repl\n"
.."- To display metadata: ./cli.sh meta ./examples/asteroids/game.lua\n"

local version_message = '0.0.6'

Expand Down

0 comments on commit 6435333

Please sign in to comment.