Skip to content

Kazuki-tam/shopify-quick-theme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

shopify-quick-theme

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.

Status

Release (latest by date) Issues Maintenance Release date

Features

  • 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

Requirements

Note: Please refer to Install Shopify CLI if you haven't installed Shopify CLI yet.

πŸ“– Upgrade or uninstall Shopify CLI

Main dependencies

How to use

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

Create a new theme

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

Customize an existing theme

Use pull:new command to customize an existing theme.

pnpm pull:new

Add CSS and JavaScript into your theme files

Add these tags in <head></head> section.

{{ 'custom-style.css' | asset_url | stylesheet_tag }}
<script src="{{ 'custom-script.js' | asset_url }}" defer></script>

Available Commands

Recommend you to check out these commands before you get started.

Start command

Start your project in development mode.

pnpm dev

Build command

Build your project for production.

pnpm release

Build your project for development.

pnpm build
Other support commands

Pull command

Retrieve theme files from Shopify without deleting local files.

pnpm pull

Push command

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

Deploy command

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

Preview command

Returns links that let you preview the specified theme.

pnpm preview

Cheat command

Open Shopify Cheat Sheet.

pnpm cheat

Shopify Cheat Sheet

Lint command

Lint this project code.

pnpm lint

Fix this project code.

pnpm lint:fix

Test command

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

Share command

Uploads your theme as a new, unpublished theme in your theme library.

pnpm share

Package command

Packages your local theme files into a ZIP file that can be uploaded to Shopify.

pnpm package

PostInstall command

Install missing TypeScript typings.

pnpm postInstall

End-to-end test

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

Recommended IDE

Visual Studio Code

Contributes

Pull requests are always welcome.

Support

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.

Buy Me A Coffee

License

MIT