hydrogen initcommand
Creates a new Hydrogen storefront.
Anchor to flagsFlags
The following flags are available for the hydrogen init
command:
Init Git and create initial commits.
Auto installs dependencies using the active package manager.
Sets the template language to use. One of js
or ts
.
Sets the URL structure to support multiple markets. Must be one of: subfolders
, domains
, subdomains
, none
. Example: --markets subfolders
.
Use mock.shop as the data source for the storefront.
The path to the directory of the new Hydrogen storefront.
Scaffolds a new Hydrogen project with a set of sensible defaults. Equivalent to shopify hydrogen init --path hydrogen-quickstart --mock-shop --language js --shortcut --routes --markets none
Generate routes for all pages.
Creates a global h2 shortcut for Shopify CLI using shell aliases. Deactivate with --no-shortcut
.
Sets the styling strategy to use. One of tailwind
, vanilla-extract
, css-modules
, postcss
, none
.
Scaffolds project based on an existing template or example from the Hydrogen repository.
Overwrites the destination directory and files if they already exist.