- Webpack 5
- Themekit
- Tailwindcss 2
- Plain Vanilla JS
- Download and unzip
- In terminal and run
npm install - In terminal run
theme new --password=<password> --store=<example-store.myshopify.com> --name="<theme name>" --dir="dist" - Add to config.yml (example config)
ignore_files: - assets/theme.bundle.js - assets/application.bundle.js - Add
to dist/layout/theme.liquid after (line 42)
{% capture layout_bundle_js %}{{ template.name }}.bundle.js{% endcapture %} {{ layout_bundle_js | asset_url | script_tag }}<main role="main"> {{ content_for_layout }} </main> - Delete from dist/layout/theme.liquid (line 12)
{{ 'application.js' | asset_url | script_tag }} - Change
scsstobundlefrom dist/layout/theme.liquid (line 11){{ 'application.scss.css' | asset_url | stylesheet_tag }} - Start developing a theme
- Javascript
- Add your scripts to .js files in src/js/templates directory
- index.js should only contain scripts that are used by the all templates (navbar functionality)
- other .js files corresponds to its template
- CSS
- Add your tailwindcss classes to the .liquid files
- Other css needed can be added to src/css/tailwind.css
- Liquid
- Edit .liquid in dist directory
npm start
- Completes a Webpack build in development mode
- Deploys updated copy from
dist/ - Webpack begins watching for file changes
- Theme Kit begins watching for file changes in
dist/ - Theme Kit opens your development theme in your default browser
npm start:live
- Completes a Webpack build in development mode
- Deploys updated copy from
distto a live theme - Webpack begins watching for file changes
- Theme Kit begins watching for file changes in
dist - Theme Kit opens your development theme in your default browser
npm run build
- Completes a Webpack build in production mode
npm run deploy
- Completes a Webpack build in production mode
- Deploys and overwrites all theme files via Theme Kit
npm run deploy:live
- Completes a Webpack build in production mode
- Deploys and overwrites all theme files via Theme Kit on a live theme
Webpack will generate a Javascript file from src/js directory to dist/assets directory
application.css will be generated by tailwind in the dist/assets directory
Released under the MIT License.