Skip to content

nebulab/shopify_theme_toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ShopifyThemeToolkit

Shopify Theme Toolkit is a comprehensive solution for modern Shopify theme development. It enables you to quickly scaffold new themes or enhance existing ones with automated workflows, version management, and best practices. The toolkit configures Ruby and pnpm versioning, integrates the Shopify CLI and Foreman for local development, and adds ready-to-use GitHub Actions for theme checking, performance audits, and PR previews. Optional Tailwind CSS setup is included, with automatic build integration and theme.liquid injection. Ideal for individuals and teams, this toolkit ensures your themes are production-ready, CI/CD-friendly, and easy to maintain.

Requirements

To use Shopify Theme Toolkit, you need to have the following tools installed on your system:

  • curl or wget (to download the installation script and workflow files)
  • Node.js and npx (to create a new Shopify theme if not already existing)
  • mise or asdf (for version management)

Installation

curl https://raw.githubusercontent.com/nebulab/shopify_theme_toolkit/refs/heads/main/install.sh | sh

Options

You can pass the following environment variables to customize the installation:

  • RUBY_VERSION: Specify a Ruby version (default: latest)
  • PNPM_VERSION: Specify a pnpm version (default: latest)
  • USE_CURRENT_DIR: Set to true to skip theme scaffolding and install in the current directory.
  • STORE_URL: It can be the store prefix (example) or the full myshopify.com URL (example.myshopify.com, https://example.myshopify.com).

Examples:

curl https://raw.githubusercontent.com/nebulab/shopify_theme_toolkit/refs/heads/main/install.sh | RUBY_VERSION=3.1.2 bash -s
curl https://raw.githubusercontent.com/nebulab/shopify_theme_toolkit/refs/heads/main/install.sh | USE_CURRENT_DIR=true bash -s
curl https://raw.githubusercontent.com/nebulab/shopify_theme_toolkit/refs/heads/main/install.sh | STORE_URL=example-dev-store bash -s

Features

  • Theme management: Quickly create a new Shopify theme using the default Shopify CLI command, or use any existing theme directory.
  • Tools file: A pre-configured tools file to manage your development dependencies using mise or asdf.
  • Shopify CLI integration: Seamless integration with the Shopify CLI for theme development and deployment.
  • GitHub Actions workflows for automated theme checking and testing:
  • Foreman default setup: A default Procfile for running the Shopify theme dev server using bin/dev command.
  • Optional Tailwind CSS integration: Ask the user if they want to install Tailwind CSS if not detected in your package.json. Then, the installation script automatically configures the build process and includes the generated CSS in your theme layout.

GitHub Actions Requirements

Workflow Permissions

To ensure the GitHub Actions workflows work correctly, please give read and write permissions to Actions in your repository settings

  1. Navigate to your repository on GitHub.
  2. Click on the "Settings" tab.
  3. In the left sidebar, click on "Actions" and then "General".
  4. Under "Workflow permissions", select "Read and write permissions".
  5. Click "Save" to apply the changes.

Required Secrets

The following secrets need to be added to your GitHub repository for the workflows to operate correctly:

About

A toolkit for working with Shopify themes adding automations, CI, and best practices

Topics

Resources

Stars

Watchers

Forks

Languages