Skip to content

Commit ab5dda0

Browse files
authored
Merge pull request #18 from TrellisCommerce/feature/TECH-477
Feature/tech 477
2 parents 97e73f4 + 068bb1c commit ab5dda0

File tree

7 files changed

+1785
-647
lines changed

7 files changed

+1785
-647
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
name: CI
22
on: [push]
33
jobs:
4+
tailwindcss-update:
5+
name: Generate TailwindCSS
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v3
10+
- name: Generate TailwindCSS
11+
uses: ZoeyVid/tailwindcss-update@main
12+
with:
13+
input: assets/app-tailwind.css
14+
output: assets/app.css
15+
params: ""
16+
- name: Commit & Push
17+
run: |
18+
git config user.name "GitHub"
19+
git config user.email "noreply@github.com"
20+
git diff-index --quiet HEAD || git commit -m "ci: tailwindcss-update"
21+
git push
422
lhci:
523
name: Lighthouse
624
runs-on: ubuntu-latest

.husky/post-checkout

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
git update-index --skip-worktree assets/app.css

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v18

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Brought to you and maintained by [Trellis Commerce](https://trellis.co/) - A full-service eCommerce agency based in Boston, MA
22

3-
Lastest merged code from [Dawn v12.0.0](https://github.com/Shopify/dawn/releases/tag/v12.0.0)
3+
Latest merged code from [Dawn v12.0.0](https://github.com/Shopify/dawn/releases/tag/v12.0.0)
44

55
# Dawn + TailWindCSS + Prettier Shopify Starter Theme
66

@@ -15,44 +15,44 @@ The starter theme includes an integration of:
1515
## [Trellis' Prettier config](https://www.npmjs.com/package/@trelliscommerce/prettier-config) with Husky pre-commit hooks
1616

1717
- Formats JS & CSS whenever a git commit is made
18-
- Setup your own VSCode to apply Prettier formatting when a file is saved (optional)
18+
- Set up your own VSCode to apply Prettier formatting when a file is saved (optional)
1919

2020
## Other Noted Modifications
2121

22-
- Set the default page width to 1440px and tweaked the desktop page width range to be 1200px to 1600px with a step adjustment of 10px (standard desktop width used at Trellis and allows for more finetuning)
22+
- Set the default page width to 1440px and tweaked the desktop page width range to be 1200px to 1600px with a step adjustment of 10px (standard desktop width used at Trellis and allows for more fine tuning)
2323

2424
## Steps to Start Using this Starter Theme
2525

2626
1. Fork this repository & enable actions in the repo's Actions tab.
2727

2828
| :bangbang: | When forking this repo, make sure to change the settings in the forked repo under Settings > Actions > General > Workflow permissions to be `Read and write permissions` and check `Allow GitHub Actions to create and approve pull requests` for the Theme Check & Lighthouse actions to run |
29-
| :--------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
29+
|:----------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
3030

3131
2. Clone the forked repo, navigate to the directory in your terminal, & run `npm install`.
3232

3333
3. In the theme section of your Shopify admin you can connect to a GitHub repository via “Add theme” button.
3434

3535
<img width="500" alt="Add a theme and connect it to your github repo" src="https://user-images.githubusercontent.com/75811975/162517993-31a22954-6600-45f9-ab6e-2b9735c9efba.png">
3636

37-
4. In your terminal, navigate to the cloned repo directory, and use the Shopify CLI to login to your store with `shopify login --store=mystore.myshopify.com` and launch the development server with `shopify theme serve`.
37+
4. In your terminal, navigate to the cloned repo directory, and use the Shopify CLI to launch the development server to your store with `shopify theme dev --store=mystore.myshopify.com` and upload the theme with `shopify theme share`.
3838

3939
| :bangbang: | If you are working on a development store and are signed in via your partner dashboard, you must add a separate user in that Shopify store with admin rights and sign in with this new user when logging in using the Shopify CLI |
40-
| :--------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
40+
|:----------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
4141

4242
You can add users in the store Settings:
4343

4444
<img width="500" alt="Where to add users in the store settings" src="https://user-images.githubusercontent.com/75811975/162517914-6fe20ef6-7b58-4337-b488-75966694ef92.png">
4545

46-
## Add Github secrets for Lighthouse CI Performance Evaluation Actions
46+
## Add GitHub secrets for Lighthouse CI Performance Evaluation Actions
4747

4848
| :bangbang: | This repo does not have the following secrets configured, which is why the Lighthouse action is failing. |
49-
| :--------: | :------------------------------------------------------------------------------------------------------- |
49+
|:----------:|:---------------------------------------------------------------------------------------------------------|
5050

5151
First, make sure your `Workflow permissions` are set like below in order for the actions to run:
5252

5353
<img width="500" alt="Workflow permissions settings" src="https://user-images.githubusercontent.com/75811975/167029308-3b05be7b-bae0-4cb9-8234-7da07b4f715e.png">
5454

55-
In your github repo, navigate to Settings > Secrets > Actions and add the following repository secrets:
55+
In your GitHub repo, navigate to Settings > Secrets > Actions and add the following repository secrets:
5656

5757
`SHOP_APP_ID` & `SHOP_APP_PASSWORD`
5858

@@ -86,7 +86,7 @@ In your github repo, navigate to Settings > Secrets > Actions and add the follow
8686

8787
- To enable GitHub status checks via the official GitHub app, [install and authorize the app](https://github.com/apps/lighthouse-ci) with the owner of the target repo. If the repo is within an organization, organization approval might be necessary. Copy the app token provided on the authorization confirmation page and add it to your build environment as `LHCI_GITHUB_APP_TOKEN`
8888

89-
These secret values are used in the `ci.yml` github workflow:
89+
These secret values are used in the `ci.yml` GitHub workflow:
9090

9191
<img width="500" alt="Secrets shown in the workflow file" src="https://user-images.githubusercontent.com/75811975/162518733-c1744910-85b2-44e3-91d0-08acfc018ba1.png">
9292

@@ -109,11 +109,11 @@ These secret values are used in the `ci.yml` github workflow:
109109
4. Anytime you add a TailwindCSS class (remember to prefix it with twcss-), run the CLI tool to scan your template files for classes and build your CSS to assets/app.css:
110110
`npx tailwindcss -i ./assets/app-tailwind.css -o ./assets/app.css --watch`
111111

112-
- Run this command in a separate terminal so it will continue to run while you are developing.
113-
- Note that using a TailwindCSS class without a space afterwards when followed by a liquid tag causes compiling issues:
112+
- Run this command in a separate terminal, so it will continue to run while you are developing.
113+
- Note that using a TailwindCSS class without a space afterward when followed by a liquid tag causes compiling issues:
114114
`lg:!twcss-px-[32px]{% endif %}'>`
115115
But this does work:
116116
`lg:!twcss-px-[32px] {% endif %}'>`
117117

118118
5. Launch the local development server:
119-
`shopify theme serve`
119+
`shopify theme dev`

0 commit comments

Comments
 (0)