Skip to content

Commit c0603c7

Browse files
authored
v2.3.1
2 parents cb0f2e8 + 395d5dc commit c0603c7

File tree

8 files changed

+37
-19
lines changed

8 files changed

+37
-19
lines changed

.config/.stylelintrc.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,22 @@ module.exports = {
22
extends: 'stylelint-config-recommended',
33
plugins: [
44
/**
5+
* add plugins
56
* docs: https://stylelint.io/user-guide/configure#plugins
67
*/
7-
// 'stylelint-scss' // not included by default, add with a package manager
8+
// 'stylelint-scss' // stylelint by itself supports SCSS syntax very well
89
],
910
ignoreFiles: [
1011
/**
12+
* ignore certain files
1113
* docs: https://stylelint.io/user-guide/configure#ignorefiles
1214
*/
1315
// 'my-file.css',
1416
// '**/my-directory/*.css'
1517
],
1618
rules: {
1719
/**
20+
* add custom rules
1821
* docs: https://stylelint.io/user-guide/rules/list
1922
*/
2023
'at-rule-no-unknown': [

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if (Object.keys(options).length < 4) {
2828
}
2929

3030
if (!options.env.match(/^(dev|live)$/)) {
31-
console.error(chalk.red(`env should be ${chalk.inverse('dev')} or ${chalk.inverse('live')}`))
31+
console.error(chalk.red(`env should be ${chalk.inverse(' dev ')} or ${chalk.inverse(' live ')}`))
3232
process.exit()
3333
}
3434

@@ -44,7 +44,7 @@ let themeId // assigned after remote initialization
4444
const initTheme = async () => {
4545
// initialize empty theme on shopify store
4646
try {
47-
const response = await axios.post(
47+
const response = await axios.post(
4848
`https://${options.store}/admin/api/2020-10/themes.json`,
4949
{ theme: { name: options.name } },
5050
{ headers: { 'X-Shopify-Access-Token': options.password } }

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ $ npm run shopify:init -- --password [your-api-password] --store [your-store.mys
141141
4. Start developing:
142142
```sh
143143
$ npm run start
144-
$ npm run open:dev # open store url in default browser
144+
$ npm run open:dev # open/preview theme in default browser
145145
```
146146
<!-- getting started (end) -->
147147

@@ -161,9 +161,9 @@ $ npm run deploy:live -- --allow-live
161161
```
162162

163163
### Teams
164-
The `shopify:init` task always creates a new theme with a unique ID on the provided store. Sometimes it can be useful to connect to an existing initialized theme (e.g. when multiple people deploy to the same live environment).
164+
The `shopify:init` task always creates a new theme with a unique ID for the provided store. Sometimes it can be useful to connect to an existing initialized theme (e.g. when multiple people deploy to the same live environment).
165165

166-
1. Run the following command to list all themes on the provided store and write down the ID for the theme in question:
166+
1. Run the following command to list all themes from the provided store and write down the ID for the theme in question:
167167

168168
```sh
169169
$ npm run shopify:themes -- --password [your-api-password] --store [your-store.myshopify.com]
@@ -405,7 +405,7 @@ shopify-theme-lab/ 📁 root of your Shopify Theme Lab project
405405
│ │ ├── .shopifyignore 📄 files and directories that won't be uploaded to Shopify
406406
│ │ └── ...
407407
│ ├── webpack/ 📁 webpack configs
408-
│ │ ├── webpack.common.js 📄 webpack shared config used by development and production
408+
│ │ ├── webpack.common.js 📄 webpack shared config used in development and production
409409
│ │ ├── webpack.dev.js 📄 webpack development config
410410
│ │ └── webpack.prod.js 📄 webpack production config
411411
│ ├── .browserslistrc 📄 Browserslist config
@@ -438,18 +438,18 @@ shopify-theme-lab/ 📁 root of your Shopify Theme Lab project
438438
| dev | bundle and watch for changes in `src/` files with webpack |
439439
| build | create minified production files for Shopify in `shopify/assets/` directory |
440440
| reloadr | run an HTTP server and WebSocket server for remote auto-reloading |
441-
| lint | run `lint:js` and `lint:css` tasks one after another |
441+
| lint | run `lint:js` and `lint:css` tasks in sequence |
442442
| lint:js | lint `.js` and `.vue` files inside the `src/` directory |
443443
| lint:css | lint the `<style></style>` section of `.vue` files, `.css`, `.sass` and `.scss` files inside the `src/` directory |
444444
| shopify:watch | watch for changes in the `shopify/` directory and upload to the dev store |
445445
| shopify:init | initialize a theme on remote Shopify store and create a Shopify config file for the specified environment |
446-
| shopify:themes | list all themes with IDs on the provided store. Takes two arguments `--password` and `--store` |
446+
| shopify:themes | list all themes with IDs from the provided store. Takes two arguments `--password` and `--store` |
447447
| deploy:dev | upload the `shopify/` directory to the dev store |
448448
| deploy:live | upload the `shopify/` directory to the live store |
449449
| settings:dev | download `settings_data.json` from the dev store |
450450
| settings:live | download `settings_data.json` from the live store |
451-
| open:dev | open the URL of the dev store |
452-
| open:live | open the URL of the live store |
451+
| open:dev | open/preview theme on the dev store |
452+
| open:live | open/preview theme on the live store |
453453
<!-- tasks (end) -->
454454

455455
<!-- development environment concepts (start) -->

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.3.0",
5+
"version": "2.3.1",
66
"license": "MIT",
77
"repository": {
88
"type": "git",

shopify/sections/header.liquid

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
<div class="container">
2-
<a href="/">Logo</a>
2+
<a href="{{ routes.root_url }}">
3+
Logo
4+
</a>
35

46
{% render 'layout-menu' %}
57

68
<div>
79
{% if shop.customer_accounts_enabled %}
810
{% if customer %}
9-
<a href="/account">{{ 'layout.customer.account' | t }}</a>
11+
<a href="{{ routes.account_url }}">{{ 'layout.customer.account' | t }}</a>
1012
{{ 'layout.customer.logout' | t | customer_logout_link }}
1113
{% else %}
1214
{{ 'layout.customer.log_in' | t | customer_login_link }}
1315
{{ 'layout.customer.register' | t | customer_register_link }}
1416
{% endif %}
1517
{% endif %}
1618

17-
<a href="/cart">{{ 'layout.cart.title' | t }}</a>
19+
<a href="{{ routes.cart_url }}">
20+
{{ 'layout.cart.title' | t }}
21+
</a>
1822
</div>
1923
</div>
2024

shopify/snippets/vue-examples.liquid

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,25 @@
3030
</div>
3131
</render-my-component>
3232

33+
<!-- global mixin -->
34+
<div>
35+
<div class="shopify-theme-lab__subline">
36+
Global Vue mixin
37+
</div>
38+
39+
<div>
40+
NODE_ENV: {% raw %}{{ env }}{% endraw %}
41+
</div>
42+
</div>
43+
3344
<!-- global directive -->
3445
<div>
3546
<div class="shopify-theme-lab__subline">
3647
Global Vue directive
3748
</div>
3849

3950
<div v-my-directive>
40-
Check the web console!
51+
this text
4152
</div>
4253
</div>
4354

@@ -48,7 +59,7 @@
4859
</div>
4960

5061
<div>
51-
{% raw %}{{ 'this string' | my-filter }}{% endraw %}
62+
{% raw %}{{ 'this text' | my-filter }}{% endraw %}
5263
</div>
5364
</div>
5465
</div>

src/vue/directives/global.directive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export default {
22
name: 'myDirective',
33
directive: {
44
inserted (el) {
5-
console.log(`${el.innerText} “v-my-directive” was used on this element.`)
5+
el.innerText = `“v-my-directive” was used on ${el.innerText}`
66
}
77
}
88
}

0 commit comments

Comments
 (0)