sassis included in the project to compile any.scssfile in the assets directory, into a.cssfile with the same name. This allows basic usage of sass/scss in your theme development, while still loading minified CSS files in your theme sections..shopifyignoreis required to instruct the Shopify CLI not to interact with the additional files that are not used in a Shopify theme directory.- A Github action is included in
.github/workflowsto allow for changes to.scssfiles from the Shopify admin code editor to be compiled to CSS. When a.scssfile is edited and saved in the code editor, the action will run prior to the commit, and compile a.cssfile which will get picked up by Shopify's connection to Github. This Github action is only run when the user making the commit isshopify[bot]. This prevents unnecessary compiling on each commit from the developer. - CSS files that have been compiled by sass should not be edited directly.
- SCSS files should not be rendered in your theme liquid.
- See the following demo files:
assets/_helpers.scssassets/_mixins.scssassets/_variables.scssassets/example-section.scssassets/example-section.csssections/example-section.liquid
See installation and getting started instructions for the Shopify CLI first
- Clone repo and push your theme up to Github
- Run
npm installto installsass - Connect your Github repo to Shopify to install the theme in your store
- Run
npm run devto begin development on your connected theme - Commit and push changes to Github