- Webpack 4
- Stylelint
- ESLint
- Babel
- Middleware for Shopify preview
- BrowserSync
-
Have theme kit installed globally (run auto install once per computer)
-
Create config.yml
-
Install dependencies -
npm install
-
Start webpack compiler -
npm run watch
-
Watch files and upload to Shopify -
npm run theme:watch
-
Build css/js using production settings
npm run build
-
Deploy theme -
npm run theme:deploy
If this is a new project you will need to add the compiled files to theme.liquid
{{ 'compiled.css' | asset_url | stylesheet_tag }}
{{ 'compiled.js' | asset_url | script_tag }}
Build - Builds js/scss in production mode
npm run build
Test - Runs all tests and code linters
npm run test
Lint CSS - Checks scss for errors and best practices.
npm run lint:css
Lint JS - Checks js for errors and best practices.
npm run lint:js
Fix CSS - Checks scss for errors and best practices. Automatically fixes simple errors like line endings
npm run fix:css
Fix jS - Checks js for errors and best practices. Automatically fixes simple errors.
npm run fix:js
This project uses stylelint and eslint for checking css and js.