fw-react-cli v1.0.3
fw-react-cli
Usage
This is a command line tool for managing projects. Below are the available commands and their usage.
create
Creates a new project or page.
fw-cli create [options]
Options:
-p, --project [project]
: Creates a new project with the specified name.--page [page]
: Creates a new page with the specified name.
Examples:
Create a new project:
fw-cli create -p my-project
Create a new page within a project:
fw-cli create --page my-page
Note: If no page name is provided when creating a page, an error will be displayed.
start
Starts the service.
cd /path/to/my-project # Enter directory
yarn # Install dependencies
fw-cli start [options] # Select project
Options:
-e, --env [env]
: Specifies the environment to start (default: "dev")
If the current working directory is within a project's page folder, it will start the service for that specific page. Otherwise, it will prompt you to select a project from the available choices.
build
Builds the project for production.
fw-cli build [options]
Options:
-p, --page [page]
: Specifies the page to build (optional).-e, --env [env]
: Specifies the environment for the build (default: "prod").
If the current working directory is within a project's page folder, it will build the specified page. Otherwise, it will prompt you to select a project from the available choices. If a page name is provided as an option, it will build that specific page instead of prompting for selection.
Note: The build command requires the environment variable SV_ENV
to be set.
Please make sure to replace fw-cli
with the actual path to the CLI script in your system.