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

5. Start developing

Hugues Tennier edited this page Oct 29, 2018 · 2 revisions

Now comes the fun part! To begin developing your very own theme with Slate's development pipeline, run the following command:

yarn start

(or, if you're using npm, npm start)

This compiles your local theme files into a dist directory, uploads these files to your remote Shopify store and finally boots up a local Express server that will serve most of your assets (i.e. CSS and JavaScript) from https://xxx.xxx.xxx.xxx:3001.

screencast-2018-05-03-12-47-12

Note: Because we are running the server on https://, you will need to visit the asset server URL at least once and tell your browser to "trust it". Otherwise, local assets will be blocked and your theme will appear broken.

Specifying a different environment

By default, Slate will look for an .env file in the root of your theme directory. However, users can specify an --env flag to target specific environments. These environment files need to be named .env.{env}.

For example, the following command will target an .env.production file:

yarn start --env=production

Next: Commands