Liquid, JavaScript, themes, sales channels
Hi!
Our team is new to Shopify. We're doing a commerce project for a client and I wonder if we're on the right track with how we've set things up so far. The overall question is basically: "is this how you guys would do it?". Any thoughts or hints are more than welcome!
This is where we are right now:
- We got our real store project (not dev-store), with an Online Store, and a private app in place.
- The private app code lives in a Gitlab repo.
- The theme-code currently also lives in this private app.
- In the Online Store we got a live production theme, a staging theme, and personal development themes for each developer(!).
- The CD/CI-idea here is that: 1) each developer should only push changes to his/her development theme-instance (either with themekit's watch-command or by pushing to his/her dev-branch),
2) pushing/merging updates into the master-branch updates the staging theme, 3) and tags on the master-branch updates the live production theme
- in private app: /theme/config.yml (variables live locally in Library/Application Support/Shopify/variables):
development:
password: ${SHOPIFY_API_PASSWORD}
theme_id: ${DEVELOPMENT_THEME_ID}
store: ${SHOPIFY_STORE}.myshopify.com
staging:
password: ${SHOPIFY_API_PASSWORD}
theme_id: ${STAGING_THEME_ID}
store: ${SHOPIFY_STORE}.myshopify.com
production:
password: ${SHOPIFY_API_PASSWORD}
theme_id: ${PRODUCTION_THEME_ID}
store: ${SHOPIFY_STORE}.myshopify.com
- in private app: /theme/.gitlab-ci.yml (for deploying with Themekit on push/tags on master branch)
image: python:2
stages:
- staging
- production
staging:
image: python:2
stage: staging
script:
- curl -s https://shopify.github.io/themekit/scripts/install.py | python
- theme deploy -e=staging
only:
- master
production:
image: python:2
stage: production
script:
- curl -s https://shopify.github.io/themekit/scripts/install.py | python
- theme deploy -e=production
only:
- tags
- The private app will eventually also do a lot of logical operations, e.g. communicating with external API:s and read/write customer data etc. This makes us wonder if we should split up theme and logic into separate repos, or at least use some lerna/workspace structure.
- We followed parts of this guide to set up things initially.
So... do you guys have a similar or different approach? Any aspects we might have forgotten/should consider? Sorry for a very broad question, but we're grateful for any insights on this!
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024