Skip to content

Commit 97693dd

Browse files
authored
Merge pull request #17 from uicrooks/dev
v2.2.2
2 parents e545099 + 677bd6e commit 97693dd

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

.config/plugins/shopify/theme.init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const initTheme = async () => {
101101

102102
// check if settings_data.json already exists and if not then create that file
103103
if (!fs.existsSync(settingsFilePath)) {
104-
await fs.outputFile(settingsFilePath, JSON.stringify(settingsData))
104+
await fs.outputFile(settingsFilePath, JSON.stringify(settingsData, null, 2))
105105
}
106106
} catch (e) {
107107
console.error(chalk.red(e))

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Shopify Theme Lab is a customizable modular development environment for blazing-
8989
- [Autoprefixer](https://github.com/postcss/autoprefixer)
9090
- [PurgeCSS](https://tailwindcss.com/docs/optimizing-for-production#removing-unused-css) integrated in Tailwind CSS
9191
- 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)
9393
- Clean [config structure](.config/)
9494
- Easily adjustable/extendable configurations
9595
<!-- features (end) -->
@@ -103,7 +103,7 @@ Shopify Theme Lab is a customizable modular development environment for blazing-
103103

104104
<!-- installing (start) -->
105105
## 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:
107107

108108
### npm
109109
```shell
@@ -150,6 +150,12 @@ $ npm run open:dev # open store url in default browser
150150
$ npm run build # bundle js, css and other assets like images/fonts with webpack
151151
$ npm run deploy:live # deploy shopify/ directory
152152
```
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+
```
153159
<!-- deploying (end) -->
154160

155161
<!-- css preprocessors (start) -->
@@ -375,7 +381,7 @@ module: {
375381
| .config | contains multiple configurations and plugins for the development environment |
376382
| .github | contains files related to github and design/image files for READMEs |
377383
| 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 |
379385
<!-- directories (end) -->
380386

381387
<!-- tasks (start) -->
@@ -408,11 +414,11 @@ Inside `.configs/` are multiple pre-configured configs and plugins. You should b
408414
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.
409415

410416
### 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`
416422

417423
### Shopify remote auto-reloading
418424
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
424430
- When the development task is running, the browser console throws a `bundle.css` missing error
425431
- 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
426432
- 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
428434
<!-- limitations (end) -->

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "shopify-theme-lab",
33
"description": "Customizable modular development environment for blazing-fast Shopify theme creation",
44
"author": "Sergej Samsonenko <contact@sergej.codes>",
5-
"version": "2.2.1",
5+
"version": "2.2.2",
66
"license": "MIT",
77
"repository": {
88
"type": "git",

0 commit comments

Comments
 (0)