Download the PHP package darling/rig without Composer
On this page you can find all versions of the php package darling/rig. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package rig
Short Description Command line utility designed to aide in development with Roady
License MIT
Informations about the package rig
rig is a command line utility designed to aide in development with the Roady php framework.
- Installation
- Getting Started
- Commands
Installation
rig can be installed via one of the following installation methods:
Install via composer:
Note: If rig is installed via composer, then the rig, rig.php,
and setupRig.sh scripts will be available in vendor/bin.
Install via git:
After installing rig, it is helpful to create a symlink to rig
in ~/.local/bin.
To make this easier, rig provides a setupRig.sh script that will
do just that.
If rig was installed with composer require darling/rig,
run the setup script in vendor/bin:
If rig was installed with git clone, run the setup script in
rig's root directory:
Note:
setupRig.sh will not overwrite an existing rig symlink by default.
To force setupRig.sh to overwrite an existing rig symlink use
the --force flag:
Getting Started
To make sure rig is is installed and callable, run the following command:
If that worked, then rig is installed properly.
Creating a Module
rig can be used to create new Module for a Roady project.
For example, to create a Module named hello-world run the
following command:
This will create a Module named hello-world in the current
Roady project's modules directory.
It will also create the following files:
To use this Module, start a development server on localhost:8080
via rig --start-servers --open-in-browser.
Note: If localhost:8080 does not open in a browser automatically, then manually open a web browser and navigate to localhost:8080.
If everything is working then the new module's output,
Hello hello-world, should be displayed in the browser.
Additional Documentation
Documentation relevant to rig's individual commands can be
found below.
More thorough documentation about using rig with Roady to build
websites can be found in Roady's
README.md.
Commands
- --help
- --delete-route
- --list-routes
- --new-module
- --new-route
- --start-servers
- --update-route
- --version
- --view-action-log
rig --help
Display documentation about rig, or one of rig's commands.
Arguments:
Examples:
rig --delete-route
Delete the Route that is assigned the specified Route hash.
Note: Route hashes are displayed in the output of rig --list-routes.
Arguments:
Examples:
rig --list-routes
List the Routes configured by existing Modules.
Note: If no arguments are specified, all of the Routes defined by all existing Modules will be included in the list.
Arguments:
Examples:
It is also possible to specify multiple arguments to further filter the results.
The output of rig --list-routes will look something like:
rig --new-module
Create a new Module in the current Roady project's modules
directory.
If the --no-boilerplate flag is not specified,
the following initial files and directories
will be created for the new Module.
Note: The name NEW_MODULE_NAME will be replaced
by the new Module's actual name.
The content of the initial files created for the new Module will be:
-
output/NEW_MODULE_NAME.html -
localhost.8080.jsonNote: The string
NEW_MODULE_NAMEin the examplejsonwill be replaced by the new Module's actual name.
Arguments:
Examples:
rig --new-route
Define a new Route for an existing Module.
Arguments:
Examples:
rig --start-servers
Start up one or more local servers on the specified ports.
If no ports are specified then start a local server on port 8080.
The servers will be available at localhost:PORT, for example,
rig --start-server 8888 would start a local server that would be
accsessible at localhost:8888.
Arguments:
Examples:
rig --update-route
Update the Route that is assigned the specified Route hash using the specified criteria.
Note: Route hashes are displayed in the table produced by
rig --list-routes.
Arguments:
Examples:
rig --version
Display rig's version.
Note: If rig is not up to date, a warning message will be shown.
Examples:
rig --view-action-log
View the log of Actions that have been taken by the commands run by rig.
Examples:
All versions of rig with dependencies
darling/php-darling-dev-tools Version ^1.0
darling/php-file-system-paths Version ^1.0
darling/php-text-types Version ^1.1
darling/php-unit-test-utilities Version ^1.0
laravel/prompts Version ^0.1.16
erusev/parsedown Version ^1.7
darling/roady-module-utilities Version ^1.0