Skip to content

Commit

Permalink
Merge pull request #92 from uicrooks/dev
Browse files Browse the repository at this point in the history
v3.1.0
  • Loading branch information
sergejcodes authored Jun 28, 2021
2 parents 04c35f6 + ba0402b commit 393968d
Show file tree
Hide file tree
Showing 6 changed files with 2,044 additions and 1,690 deletions.
3 changes: 3 additions & 0 deletions .config/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const isDevelopment = process.env.NODE_ENV === 'development'

module.exports = {
extends: [
'eslint:recommended',
Expand Down Expand Up @@ -29,6 +31,7 @@ module.exports = {
* add custom rules
* docs: https://eslint.org/docs/rules
*/
'no-unused-vars': isDevelopment ? 'off' : 'error',
// 'quotes': ['error', 'single'],
// 'semi': ['error', 'never']
}
Expand Down
2 changes: 1 addition & 1 deletion .config/shopify/shopify.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# if you are manually initializing the local config:
# don't forget to set the correct environment on the next line, either 'dev:' or 'live:'
dev:
password: [your-api-password]
password: [your-password]
theme_id: "[your-theme-id]"
store: [your-store].myshopify.com
directory: shopify
Expand Down
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ Shopify Theme Lab is a customizable modular development environment for blazing-
- Default Shopify theme directory structure with unstyled `.liquid` files
- A batch of `npm scripts` to run common tasks
- JavaScript
- [Vue](https://vuejs.org)
- [Vuex](https://vuex.vuejs.org)
- Swap Vue with any other framework e.g. [Alpine.js](https://github.com/alpinejs/alpine)
- [Vue](https://v3.vuejs.org)
- [Vuex](https://next.vuex.vuejs.org)
- Swap Vue with any other framework e.g. [Alpine.js](https://alpinejs.dev)
- [Axios](https://github.com/axios/axios)
- Extend with [npm packages](https://www.npmjs.com) 📦
- CSS
Expand Down Expand Up @@ -155,14 +155,14 @@ $ yarn install --force
<!-- getting started (start) -->
## Getting started

1. Get Shopify API access: [Instructions at Theme Kit Docs](https://shopify.dev/tools/theme-kit/getting-started#step-2-generate-api-credentials)
1. Get Shopify Theme Kit access: [Instructions at Theme Kit Docs](https://shopify.dev/tools/theme-kit/manage-theme-kit-access)

2. Initialize theme on Shopify store with credentials from the first step. Either for **dev** or **live** environment:

> `npm` requires the extra `--` before any arguments! When using `yarn` you can omit them.
```sh
$ npm run shopify:init -- --password [your-api-password] --store [your-store.myshopify.com] --env [dev or live] --name [theme-name]
$ npm run shopify:init -- --password [your-password] --store [your-store.myshopify.com] --env [dev or live] --name [theme-name]
```

3. Publish the new theme through the Shopify panel: **your-store.myshopify.com/admin/themes**
Expand Down Expand Up @@ -201,7 +201,7 @@ The `shopify:init` task always creates a new theme with a unique ID for the prov
1. Run the following command to list all themes from the provided store and write down the ID for the theme in question:

```sh
$ npm run shopify:themes -- --password [your-api-password] --store [your-store.myshopify.com]
$ npm run shopify:themes -- --password [your-password] --store [your-store.myshopify.com]
```

2. Copy and rename the Shopify sample config file:
Expand All @@ -219,7 +219,7 @@ $ cp .config/shopify/shopify.sample.yml .config/shopify/shopify.live.yml # or co
1. Add the following four secrets to your Shopify Theme Lab repo in `settings``secrets`:

```sh
SHOPIFY_API_PASSWORD # your-api-password
SHOPIFY_PASSWORD # your-password
SHOPIFY_STORE_URL # your-store.myshopify.com
SHOPIFY_ENV # dev or live
SHOPIFY_THEME_ID # theme-id (without quotation marks) - find the id either in shopify.[env].config.yml or with shopify:themes task
Expand Down Expand Up @@ -268,7 +268,7 @@ jobs:
# 3. deploys the shopify/ directory to the remote store
- name: Deploy to Shopify store
run: |
npx themelab shopify:init -p ${{ secrets.SHOPIFY_API_PASSWORD }} -s ${{ secrets.SHOPIFY_STORE_URL }} -e ${{ secrets.SHOPIFY_ENV }} -i ${{ secrets.SHOPIFY_THEME_ID }}
npx themelab shopify:init -p ${{ secrets.SHOPIFY_PASSWORD }} -s ${{ secrets.SHOPIFY_STORE_URL }} -e ${{ secrets.SHOPIFY_ENV }} -i ${{ secrets.SHOPIFY_THEME_ID }}
npm run settings:${{ secrets.SHOPIFY_ENV }}
npm run deploy:${{ secrets.SHOPIFY_ENV }} -- --allow-live
```
Expand Down Expand Up @@ -459,7 +459,7 @@ module: {
```

### Alpine.js
If you want to use something lighter than Vue, a good alternative is [Alpine.js](https://github.com/alpinejs/alpine).
If you want to use something lighter than Vue, a good alternative is [Alpine.js](https://alpinejs.dev).

1. Install package:

Expand Down Expand Up @@ -525,6 +525,9 @@ shopify-theme-lab/ 📁 root of your Shopify Theme Lab project
| lint | run `lint:js` and `lint:css` tasks in sequence |
| lint:js | lint `.js` and `.vue` files inside the `src/` directory |
| lint:css | lint the `<style></style>` section of `.vue` files, `.css`, `.sass` and `.scss` files inside the `src/` directory |
| fix | same as `lint` task but also fixes any fixable errors |
| fix:js | same as `lint:js` task but also fixes any fixable errors |
| fix:css | same as `lint:css` task but also fixes any fixable errors |
| shopify:watch | watch for changes in the `shopify/` directory and upload to the dev store |
| shopify:init | initialize a theme on remote Shopify store and create a Shopify config file for the specified environment (Run in the root directory of your project) |
| shopify:themes | list all themes with IDs from the provided store. Takes two arguments `--password` and `--store` |
Expand Down
Loading

0 comments on commit 393968d

Please sign in to comment.