This repository contains a starting point for Shopify Online Store 2.0 Theme development using Tailwind CSS and the default Dawn theme.
:bulb: On june 29, Shopify introduced a new git-based workflow. To learn more, visit the create a theme guide or visit shopify.dev.
A short description of this workflow:
src/index.css
assets/index.css
You can copy the Lighthouse Github Action from the original Dawn theme repository to track the performance of your theme on every push.
Run the following commands:
git clone [email protected]:wesselvanree/shopify-theme-tailwind.git
cd shopify-theme-tailwind
npm install
Make sure the assets/index.css
output file is included in the
layout/theme.liquid
file. Add this line of code under the base.css stylesheet
tag.
<!-- line 98 -->
{{ 'index.css' | asset_url | stylesheet_tag }}
Once you've made your first commit, a dist branch will be created on Github. Use
the Shopify Github integration to sync your theme with the dist branch by going
to your admin dashboard
> Online Store
> Themes
> Add Theme
>
Connect from Github
.
First, log in to your store if you was not logged in already.
shopify login --store your-store-name.myshopify.com
Run npm start
. This command will watch your files, build on change and update
the Shopify theme preview.
This repository contains a Github Action that uses
JamesIves/[email protected].
This action does not activate Github Pages in your repository but just commits
the build to another branch. Currently, the action is configured to deploy the
build to the dist branch. You can easily customize this by editing
.github/workflows/deploy.yml
.
Alternatively, you can create the build manually. Run npm run build
to build
for production. You can use the
Shopify Github integration
to track a branch in your Github repository.
Using the built-in Shopify code editor would not be effective when using file transformations like this. The changes made by your merchant in the code editor would be overridden when you push new changes.
If you have any suggestions to improve this repository, please open an issue. I would be happy to hear from you.