Skip to content

Workflow ​

Development Setup ​

Theme development requires two terminal sessions running simultaneously:

bash
npm run dev
bash
npm run server
  • Vite (npm run dev) handles asset compilation (JS/SCSS), the component-to-snippet build pipeline, and hot reload when files in components/ or src/ change.
  • Shopify CLI (npm run server, which runs shopify theme dev --live-reload full-page) serves the theme for local preview, syncing Liquid changes to a development store.

Node Version ​

The project uses Node.js 24 (specified in .nvmrc). Use nvm use to switch:

bash
nvm use

Available Scripts ​

ScriptCommandPurpose
npm run devvite devStart Vite dev server with hot reload
npm run buildvite buildProduction build
npm run servershopify theme dev --live-reload full-pageShopify CLI theme preview
npm run lintbiome checkCheck linting
npm run lint:fixbiome check --fixFix linting issues
npm run formatbiome formatCheck formatting
npm run format:fixbiome format --fixFix formatting

Making Changes ​

Liquid Changes ​

  1. Edit the component in components/ (never sections/ or snippets/)
  2. The hot reload plugin copies the file to its flattened destination
  3. Shopify CLI detects the change and syncs to the dev store
  4. Browser refreshes automatically

JavaScript Changes ​

  1. Edit the JS file in components/ or src/js/
  2. Vite recompiles the module
  3. Browser refreshes (full page reload, not HMR for Liquid-driven pages)

Style Changes ​

  1. Edit style.scss in the component folder, or global styles in src/scss/
  2. Vite recompiles the CSS bundle
  3. Browser updates via HMR (CSS changes are hot-swapped without page reload)

Building for Production ​

bash
npm run build

This generates:

  • assets/ — compiled and hashed JS/CSS bundles
  • sections/ — flattened section Liquid files
  • snippets/ — flattened snippet Liquid files

Deploying to Shopify ​

Use Shopify CLI to push the theme:

bash
shopify theme push

The .shopifyignore file ensures only build outputs and standard Shopify directories are deployed. Source files (components/, src/, tooling config) are excluded.

TIP

Use shopify theme push --unpublished to push to an unpublished theme for testing before making it live.

Linting ​

The project uses Biome for both linting and formatting. It covers:

  • components/**/*.js
  • src/**
  • vite/**
  • tailwind/**/*.js
  • Root JS/MJS/CJS files

Always run npm run lint:fix before committing.

Shopify Theme Check ​

Theme Check is configured via .theme-check.yml for Liquid-specific linting. Some rules (like MatchingTranslations) are disabled for the boilerplate.

Internal developer documentation