Start developing
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 your CSS and JavaScript assets from https://xxx.xxx.xxx.xxx:3001
.
Note: Because we are running the server on
https://
, you will either need to create a self-signed SSL Certificate or 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