Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Create Slate Theme

Chris Berthe edited this page May 4, 2018 · 6 revisions

The create-slate-theme package allows you to create a new Slate project with a single command. We recommend using either yarn create or npx to create a new Slate project.

Usage

yarn create slate-theme my-new-theme

or

npx create-slate-theme my-new-theme

Note: If you prefer to use NPM, you will need to install create-slate-theme globally before creating a new project:

npm install -g create-slate-theme
create-slate-theme my-new-theme

Options

Options Description
--skipInstall Skips installing theme dependencies which greatly speeds up overall setup time.
--ssh Uses SSH, instead of HTTPS, when cloning a theme to your local directory.

Custom starting point

The default Slate theme is generated from Shopify/starter-theme; Shopify's opinionated starting point for developing Shopify themes. However, you're not forced to create a new project with Shopify's Starter Theme!

Instead, you can reference your own Github repository or local directory starting point.

Repository

To create a new theme from a GitHub repository simply pass the {username}/{repository}:

yarn create slate-theme my-new-theme shopify/skeleton-theme

Local directory

If you want to create a theme based on a local directory, reference the path:

yarn create slate-theme my-new-theme my-own-starter-theme/

Contributing your own starter theme

You can share your starting point with the community by publishing your own starter theme to Github.

For example, Thomas thinks his starter theme is way more clever than Shopify's Starter Theme. So he creates his own, pushes it to a GitHub repository and calls the following command for any of his future Slate projects:

yarn create slate-theme my-new-theme thomas/way-more-clever-starter-theme

See custom starter themes for more information on how you can generate a new project from other sources and even contribute your very own to the Slate community!

Clone this wiki locally