Skip to content

README - Local Setup for BigCommerce Stencil Development (Windows 11)

  • Node.js LTS (recommended: v20.x) installed via nvm-windows
  • Git installed (Download)
  • Python 3.x (Download)
  • Windows Terminal or VS Code integrated terminal.
  1. Install Node.js with NVM (recommended):
Terminal window
nvm install 20.12.1
nvm use 20.12.1
  1. Install Windows Build Tools (required for native Node modules):
  • Open PowerShell (Admin):
Terminal window
npm install -g windows-build-tools
  1. Install Stencil CLI globally:
Terminal window
npm install -g @bigcommerce/stencil-cli
  1. Clone your BigCommerce Theme Repository:
Terminal window
git clone https://github.com/your-repo/theme-name.git
cd theme-name
  1. Install theme dependencies:
Terminal window
npm install
  1. Prepare your Stencil Theme:
  • Create a .stencil file in the root of your theme:
{
"accessToken": "your_api_token",
"normalStoreUrl": "https://your-store.mybigcommerce.com",
"port": 3000
}

(Replace placeholders with your BigCommerce store URL and API token.)

  • Launch theme preview:
Terminal window
stencil start
  • Access your local theme at:
http://localhost:3000
  • Run Lighthouse performance tests directly from Chrome Developer Tools on your local instance.
  • Integrate Stylelint, ESLint, and Prettier in VS Code for clean code formatting and linting.