Shopify CLI Docs

shopify hydrogen generate route

Generates a set of default routes from the starter template.

Generates a set of default routes from the starter template.

Usage

shopify hydrogen generate route [flags]

Summary

Generates a set of default routes from the starter template.

Flags

  • --adapter <value> string — Remix adapter used in the route. The default is @shopify/remix-oxygen. optional Environment: SHOPIFY_HYDROGEN_FLAG_ADAPTER.
  • --locale-param <value> string — The param name in Remix routes for the i18n locale, if any. Example: locale becomes ($locale). optional Environment: SHOPIFY_HYDROGEN_FLAG_ADAPTER.
  • --path <value> string — The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run. optional Environment: SHOPIFY_HYDROGEN_FLAG_PATH.
  • --typescript — Generate TypeScript files optional Environment: SHOPIFY_HYDROGEN_FLAG_TYPESCRIPT.
  • -f, --force — Overwrites the destination directory and files if they already exist. optional Environment: SHOPIFY_HYDROGEN_FLAG_FORCE.

Official source

On this page