README - Local Setup for BigCommerce Stencil Development (Windows 11)
✅ Prerequisites:
Section titled “✅ Prerequisites:”- Node.js LTS (recommended: v20.x) installed via nvm-windows
- Git installed (Download)
- Python 3.x (Download)
- Windows Terminal or VS Code integrated terminal.
🚀 Installation Steps:
Section titled “🚀 Installation Steps:”-
Install Node.js with NVM (recommended):
Terminal window nvm install 20.12.1nvm use 20.12.1 -
Install Windows Build Tools (required for native Node modules):
- Open PowerShell (Admin):
Terminal window npm install -g windows-build-tools -
Install Stencil CLI globally:
Terminal window npm install -g @bigcommerce/stencil-cli -
Clone your BigCommerce Theme Repository:
Terminal window git clone https://github.com/your-repo/theme-name.gitcd theme-name -
Install theme dependencies:
Terminal window npm install -
Prepare your Stencil Theme:
- Create a
.stencilfile in the root of your theme:
{"accessToken": "your_api_token","normalStoreUrl": "https://your-store.mybigcommerce.com","port": 3000} - Create a
(Replace placeholders with your BigCommerce store URL and API token.)
⚙️ Running Stencil Locally:
Section titled “⚙️ Running Stencil Locally:”- Launch theme preview:
stencil start- Access your local theme at:
http://localhost:3000🔍 Testing and Optimizations:
Section titled “🔍 Testing and Optimizations:”- 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.