shopify-quick-theme is a starter kit for Shopify theme developers. This starter kit supports you to customize a Shopify theme and build a new one from scratch.
Please refer to shopify-quick-theme-mix if you want to use Shopify GitHub integration.
- Abstracting Shopify CLI command
- Bundle TS files with Rspack
- Transpile SCSS to CSS with dart-sass
- Lint TS files with ESLint
- Lint SCSS files with Stylelint
- Format code with prettier
- Built-in test runner with Jest and Playwright
Note: Please refer to Install Shopify CLI if you haven't installed Shopify CLI yet.
π Upgrade or uninstall Shopify CLI
Clone this repository and install dependencies.
pnpm install
Create a .env file at the root directory, and then add your SHOPIFY_FLAG_STORE value at least. Replace the placeholder YOUR_STORE_NAME with your actual store name.
SHOPIFY_FLAG_STORE=YOUR_STORE_NAME
Use newTheme
command to create a new theme from scratch. This command creates a copy of Dawn.
pnpm newTheme
π Shopify CLI commands for themes - init
Use pull:new
command to customize an existing theme.
pnpm pull:new
Add these tags in <head></head>
section.
{{ 'custom-style.css' | asset_url | stylesheet_tag }}
<script src="{{ 'custom-script.js' | asset_url }}" defer></script>
Recommend you to check out these commands before you get started.
Start your project in development mode.
pnpm dev
Build your project for production.
pnpm release
Build your project for development.
pnpm build
Other support commands
Retrieve theme files from Shopify without deleting local files.
pnpm pull
Upload your local theme files to Shopify without deleting remote files.
pnpm push
Push to your development theme. If you don't have a development theme, then one is created.
pnpm push:dev
Upload the theme to the theme library as a new unpublished theme.
pnpm push:upload
Build your local files and upload them to Shopify as production.
pnpm deploy
Build your local files and upload them to Shopify as development.
pnpm deploy:dev
Returns links that let you preview the specified theme.
pnpm preview
Open Shopify Cheat Sheet.
pnpm cheat
Lint this project code.
pnpm lint
Fix this project code.
pnpm lint:fix
Run End-to-end testing and unit testing.
pnpm test
Run unit testing.
pnpm unit
pnpm unit:watch
Run End-to-end testing in a headless.
pnpm e2e
Run End-to-end testing with headed browser.
pnpm e2e:headed
Generate End-to-end test code.
pnpm e2e:codegen
Uploads your theme as a new, unpublished theme in your theme library.
pnpm share
Packages your local theme files into a ZIP file that can be uploaded to Shopify.
pnpm package
Install missing TypeScript typings.
pnpm postInstall
Please create an env file and run this command if you want to do an End-to-end test.
Install supported browsers.
pnpm e2e:install
Pull requests are always welcome.
I'll be trying to keep this starter kit as up-to-date as possible. I hope you buy me a coffee if this starter kit is helpful for you.
MIT