Files
iris-context/commands/js/redwood.go
T
VERSE ebde9ba68f refactor(commands): separate commands and its core into two folders (#32)
- I think it would be better if one for commands only, one for the spec
handling core logic so people won't be confused by the core logic inside
the commands folder (cleaner I guess)
- Regen docs
2026-07-05 11:27:30 +07:00

76 lines
4.4 KiB
Go

package js
import (
"github.com/versenilvis/iris/spec"
)
func init() {
spec.Register(&spec.Spec{
Name: "redwood",
Description: "Script",
Subcommands: []spec.Subcommand{
{Name: "side", Description: "Which side(s) to build"},
{Name: "api", Description: "Build the api server"},
{Name: "web", Description: "Build the web server"},
{Name: "options", Description: "Options to pass to Webpack Dev Server"},
{Name: "aws", Description: "Deploy to AWS using the selected provider"},
{Name: "provider", Description: "AWS Deploy provider to configure"},
{Name: "netlify", Description: "Build command for Netlify deploy"},
{Name: "render", Description: "Build (web) and Start (api) command for Render deploy"},
{Name: "vercel", Description: "Build command for Vercel deploy"},
{Name: "cell", Description: "Destroy a cell component"},
{Name: "name", Description: "Name of the cell component"},
{Name: "component", Description: "Destroy a component"},
{Name: "function", Description: "Destroy a Function"},
{Name: "layout", Description: "Destroy a layout component"},
{Name: "page", Description: "Destroy a page and route component"},
{Name: "path", Description: "URL path to the page. Defaults to name"},
{Name: "scaffold", Description: "Destroy pages, SDL, and Services files based on a given DB schema Model"},
{Name: "sdl", Description: "Destroy a GraphQL schema and service component based on a given DB schema Model"},
{Name: "service", Description: "Destroy a service component"},
{Name: "dataMigration", Description: "Generate a data migration component"},
{Name: "directive", Description: "Generate a directive"},
{Name: "model", Description: "Model to generate the sdl for"},
{Name: "types", Description: "Generate types and supplementary code"},
{Name: "script", Description: "Name of the script to execute"},
{Name: "tag", Description: "Tag to use for upgrade"},
{Name: "canary", Description: "Upgrade to the latest canary release"},
{Name: "rc", Description: "Upgrade to the latest RC release"},
{Name: "port", Description: "Port to run the server on"},
{Name: "socket", Description: "Socket to run the server on"},
{Name: "apiRootPath", Description: "Root path for the api"},
{Name: "apiHost", Description: "Host to forward requests to"},
{Name: "auth", Description: "Setup auth configuration for a provider"},
{Name: "tsconfig", Description: "Setup tsconfig.json on both web and api sides"},
{Name: "deploy", Description: "Setup auth configuration for a provider"},
{Name: "up", Description: "Executes outstanding data migrations"},
},
Options: []spec.Option{
{Name: "--forward", Description: "String of one or more Webpack Dev Server config options"},
{Name: "--side", Description: "Show help for command"},
{Name: "--build", Description: "Build (web) and Start (api) command for Render deploy"},
{Name: "--serve", Description: "Build command for Vercel deploy"},
{Name: "--force", Description: "Overwrite existing files"},
{Name: "--typescript", Description: "Generate test files [default: true]"},
{Name: "--stories", Description: "Generate Storybook files [default: true]"},
{Name: "--skipLink", Description: "Generate a layout with a skip link [default: false]"},
{Name: "--stats", Description: "Print more information while building"},
{Name: "--dry-run", Description: "Check for outdated packages without upgrading"},
{Name: "--tag", Description: "Tag to use for upgrade"},
{Name: "--pr", Description: "Installs packages for the given PR"},
{Name: "--port", Description: "What port should the server run on [default: 8911]"},
{Name: "--socket", Description: "The socket the server should run. This takes precedence over port"},
{Name: "--apiRootPath", Description: "The root path where your api functions are served"},
{Name: "--apiHost", Description: "Host to forward requests to"},
{Name: "--help", Description: "Show help"},
{Name: "--version", Description: "Show version number"},
{Name: "--watch", Description: "Run all tests"},
{Name: "--collectCoverage", Description: "Delete the Jest cache directory and exit without running tests"},
{Name: "--db-push", Description: "Starts Storybook locally"},
{Name: "--open", Description: "Open Storybook in your browser on start"},
{Name: "--fix", Description: "Try to fix linting errors"},
{Name: "--database", Description: "Overwrite existing files"},
},
})
}