You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[PurgeCSS](https://tailwindcss.com/docs/optimizing-for-production#removing-unused-css) integrated in Tailwind CSS
91
91
- Shopify remote theme auto-reloading with [reloadr](.config/plugins/reloadr) plugin
92
-
- Auto-loading of Vue `components`, `mixins`, `directives` and `filters` with [require.context](https://webpack.js.org/guides/dependency-management/#requirecontext)
92
+
- Auto-loading of Vue `components`, `mixins`, `directives` and `filters`as well as Vuex `modules`with [require.context](https://webpack.js.org/guides/dependency-management/#requirecontext)
93
93
- Clean [config structure](.config/)
94
94
- Easily adjustable/extendable configurations
95
95
<!-- features (end) -->
@@ -103,7 +103,7 @@ Shopify Theme Lab is a customizable modular development environment for blazing-
103
103
104
104
<!-- installing (start) -->
105
105
## Installing
106
-
Clone or download this repo and run the following command(s) with your preferred package manager:
106
+
“Use this template”, clone or download this repo and run the following command(s) with your preferred package manager:
107
107
108
108
### npm
109
109
```shell
@@ -150,6 +150,12 @@ $ npm run open:dev # open store url in default browser
150
150
$ npm run build # bundle js, css and other assets like images/fonts with webpack
151
151
$ npm run deploy:live # deploy shopify/ directory
152
152
```
153
+
154
+
> There is a safety mechanism in place, which won't allow you to deploy to an already published theme on the **live** store. If you want to deploy regardless use the `--allow-live` flag.
155
+
156
+
```shell
157
+
$ npm run deploy:live -- --allow-live
158
+
```
153
159
<!-- deploying (end) -->
154
160
155
161
<!-- css preprocessors (start) -->
@@ -375,7 +381,7 @@ module: {
375
381
| .config | contains multiple configurations and plugins for the development environment |
376
382
| .github | contains files related to github and design/image files for READMEs |
377
383
| shopify | contains default Shopify theme directory structure with `.liquid` files and configs |
378
-
| src | contains `main.js` webpack entry point, `tailwind.config.js`, `js`, `vue` and `css` files |
384
+
| src | contains `main.js` webpack entry point, `tailwind.config.js`, `.js`, `.vue` and `.css` files |
379
385
<!-- directories (end) -->
380
386
381
387
<!-- tasks (start) -->
@@ -408,11 +414,11 @@ Inside `.configs/` are multiple pre-configured configs and plugins. You should b
408
414
By running `shopify:init` and entering credentials, the task initializes a new theme from `shopify/` directory to the provided Shopify store. It also saves a configuration file for the specified environment inside `.config/shopify/` directory. This file will be ignored by git and shouldn't be tracked for security reasons. All tasks regarding Shopify will use the credentials from the saved configuration file.
409
415
410
416
### Shopify + webpack
411
-
-You will spend most of your time in `shopify/` and `src/`directories.
412
-
-By running `npm run start` 3 tasks are executed in parallel: `dev`, `reloadr` and `shopify:watch`.
413
-
- All vue related files are auto-loaded by webpack with [require.context](https://webpack.js.org/guides/dependency-management/#requirecontext) - vue components, vuex modules, as well as mixins, directives and filters with `global` in their filename. Everything is defined in `src/main.js`.
414
-
- Vue components can be either used as regular single-file-components or as [renderless components](https://css-tricks.com/building-renderless-vue-components) without `<template></template>` tags (You can use Liquid templating while hooking in vue functionality).
415
-
- The webpack bundle and all other assets are outputted to `shopify/assets/` directory. This directory is cleaned on every build. If you want to keep certain files like favicons add `static` to their filenames: `myfile.static.png`.
417
+
-All webpack configs are inside `.config/webpack/`directory
418
+
-[main.js](src/main.js) is webpack's main entry point
419
+
- All Vue related files are auto-loaded by webpack with [require.context](https://webpack.js.org/guides/dependency-management/#requirecontext) - Vue components, Vuex modules, as well as mixins, directives and filters with `global` in their filename. Everything is defined in `src/main.js`
420
+
- Vue components can be either used as regular single-file-components or as [renderless components](https://css-tricks.com/building-renderless-vue-components) without `<template></template>` tags (You can use Liquid templating while hooking in Vue functionality).
421
+
- The webpack bundle and all other assets are outputted to `shopify/assets/` directory. This directory is cleaned on every build. If you want to keep certain files like favicons add `static` to their filenames: `myfile.static.png`
416
422
417
423
### Shopify remote auto-reloading
418
424
While `npm run start` task is running: The `shopify/` directory is being watched for changes and all changed files are uploaded to the Shopify remote server. After the upload is finished, a request is sent to a `localhost:port` address (specified in `package.json`) and the [reloadr](.config/plugins/reloadr/) plugin reloads all connected Shopify store sites. *Open the web console to check if a site is connected.*
@@ -424,5 +430,5 @@ While `npm run start` task is running: The `shopify/` directory is being watched
424
430
- When the development task is running, the browser console throws a `bundle.css` missing error
425
431
- Already running Shopify tasks only upload files which are changed, a simple re-save of a file, without editing it, won't upload the file to the remote store
426
432
- Vue components inside `.liquid` files can only be used in a non-self-closing `<kebab-case></kebap-case>` manner
427
-
-`<style></style>` and `<script></script>` will be removed on mount inside vue components (basically everything inside `<div id="app"></div>`), use `<component is="style"><componet>` and `<component is="script"></componet>` instead
433
+
-`<style></style>` and `<script></script>` will be removed on mount inside Vue components (basically everything inside `<div id="app">...</div>`), use `<component is="style"><componet>` and `<component is="script"></componet>` instead
0 commit comments