Shopify / slate

Slate is a toolkit for developing Shopify themes. It's designed to assist your workflow and speed up the process of developing, testing, and deploying themes.
https://shopify.github.io/slate
MIT License
1.28k stars 364 forks source link

Theme on live site referencing files from local server. #2 #979

Open fabianwohlfart opened 5 years ago

fabianwohlfart commented 5 years ago

Problem

working with slate breaks the live site. I know there is another closed thread #736 But I need to reconfirm or get some tipps: How do you deal with this if a website is already live with customers and you want to change things, the site always brakes for visitors? — or you are not even live yet, but the clients uploads products and wants to see them on the frontend while you work on it? — a feature?

Replication steps

npm run slate

huguestennier commented 5 years ago

Chris from our team wrote a really useful articles on how we work with Themes at Shopify here : https://www.shopify.ca/partners/blog/development-workflow

The Working with theme IDs and Configuring one or multiple environments parts should be useful for your case

fabianwohlfart commented 5 years ago

Oh okay, great thanks! So I would get one production theme and one dev theme (for example): work live on the dev theme and deploy to the production theme?

jonathanmoore commented 5 years ago

Here is our typical workflow...

  1. We have a separate development shop (shopname-dev.myshopify.com) with most of the same products and setup as our live store. However, there we can run tests with obscure product variant combinations, site settings and more. We're ok if things break there, or we mess something up. This might not be necessary for your situation.
  2. Once we've moved on from the bulk development and testing, we will duplicate our live shop's theme (shopname.myshopify.com), and run Slate to test the changes on the unpublished theme.
  3. After verifying that everything works well we deploy (Slate uploads all assets to the server) to the unpublished theme.
  4. Test again.
  5. Publish the theme update.
fabianwohlfart commented 5 years ago

thanks. now everything is clear. i chose to have two themes on the shop, one production and one as a duplicate for development.

i was wondering why npm run start --env=development is not working, but yarn start --evn=development does? i think it's not a big problem, but a bit confusing, because the documentation states that you can use either npm or yarn.

treechime commented 5 years ago

@fabianwohlfart It would depend which tool you used to install it, if that's what you mean? If you installed Slate with Yarn, then you'll have to use Yarn because npm doesn't have access to the program.