Download the PHP package phpgt/gtcommand without Composer
On this page you can find all versions of the php package phpgt/gtcommand. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phpgt/gtcommand
More information about phpgt/gtcommand
Files in phpgt/gtcommand
Package gtcommand
Short Description Provides the `gt` command for automating WebEngine development.
License
Informations about the package gtcommand
Provides the gt command for automating WebEngine development.
This repository holds the CLI functionality for PHP.Gt/WebEngine, exposed via the gt command line.
The following commands are exposed:
gt add- add a page, API endpoint or cron script from a templategt create- create a new WebEngine applicationgt init- initialise WebEngine in the current directorygt test- run configured PHP and JavaScript test suitesgt serve- run the inbuilt development servergt build- compile client-side assetsgt cron- invoke scripts or static functions at regular intervalsgt run- run all background scripts at once - a combination ofserve,build --watchandcron --watch --nowgt deploy- instantly deploy your application to the internetgt migrate- apply optional SQL-file and ORM Entity migrations
gt migrate
gt migrate supports two independent migration styles. Numbered SQL files in
query/_migration are applied when that directory contains migrations. When
phpgt/orm is installed, Entity classes in app.class_dir are also compared
with the latest schema recorded in the ORM's separate _orm table.
A project may use SQL migrations, ORM migrations, both, or neither. SQL files run first when both styles are present. If they fail, ORM migration does not run. Useful ORM options are:
--no-orm- skip Entity migrations--orm-plan- show the Entity schema changes without applying them--orm-baseline- record an existing matching schema without changing tables
gt add
Use gt add type name [template] to create new files in the current project.
Supported types:
pageapicron
Examples:
gt add page aboutgt add api usersgt add cron cleanupgt add page about multi-column
type and name are required. template is optional.
Built-in templates
If no template name is provided, gt add copies the built-in templates from this package:
src/Template/page/template.html->page/<name>.htmlsrc/Template/page/template.php->page/<name>.phpsrc/Template/api/template.php->api/<name>.phpsrc/Template/api/template.json->api/<name>.jsonsrc/Template/cron/template.php->cron/<name>.php
If a template file contains {{name}}, it is replaced with the provided name.
Project templates
If a template name is provided, files are loaded from the current working directory instead:
<type>/_template/<template>.*
For example:
gt add page about multi-column
This will copy:
page/_template/multi-column.html->page/about.htmlpage/_template/multi-column.php->page/about.php
The same lookup rule applies for api, cron, and future types that may be added later.
Proudly sponsored by
All versions of gtcommand with dependencies
phpgt/cli Version ^1.3
phpgt/server Version ^1.2
phpgt/cron Version ^1.0
phpgt/config Version ^1.2
phpgt/database Version ^1.7
phpgt/build Version ^1.0