Skip to content

Commit bf8473f

Browse files
authored
[REFACTOR] Updates templates folder and add the correct examples with a proper root README (odestry#6)
* Added the minimal template * Git added basics template * Upadted string in CI theme check * Add README to the root /templates folder. * Added theme CI to run theme check for all templates * Updated CI name * Updated theme CI to fix issue * Updated theme CI to fix issue * Added build step to tehem CI * Added build step to tehem CI * Added build step to tehem CI * added new node versions to CI * Added commend to separate tasks * Removed cache * Updated Dev container * Made a version pump
1 parent 9ea8750 commit bf8473f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1637
-641
lines changed

.devcontainer/devcontainer.env.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SHOPIFY_FLAG_STORE=example-store.myshopify.com
2+
# SHOPIFY_CLI_THEME_TOKEN=<Theme access app token>

.devcontainer/devcontainer.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "adastra-devcontainer",
3+
"image": "mcr.microsoft.com/vscode/devcontainers/javascript-node:18",
4+
// Features to add to the dev container. More info: https://containers.dev/features.
5+
"features": {
6+
"ghcr.io/NicoVIII/devcontainer-features/pnpm:1": {},
7+
"ghcr.io/devcontainers/features/ruby:1": {},
8+
"ghcr.io/devcontainers/features/github-cli:1": {},
9+
"ghcr.io/devcontainers-contrib/features/act-asdf:2": {}
10+
},
11+
"customizations": {
12+
"vscode": {
13+
"extensions": [
14+
"editorconfig.editorconfig",
15+
"dbaeumer.vscode-eslint",
16+
"shopify.theme-check-vscode",
17+
"bradlc.vscode-tailwindcss"
18+
]
19+
}
20+
},
21+
"forwardPorts": [9292, 5173],
22+
"portsAttributes": {
23+
"9292": {
24+
"label": "Shopify"
25+
},
26+
"5173": {
27+
"label": "Vite"
28+
}
29+
},
30+
// Use 'postCreateCommand' to run commands after the container is created.
31+
"postCreateCommand": "gem install bundler && npm i -g @shopify/cli @shopify/theme && npm i",
32+
"postAttachCommand": "gh codespace ports visibility 9292:public 5173:public -c $CODESPACE_NAME && exit",
33+
"runArgs": ["--env-file", ".devcontainer/devcontainer.env"]
34+
}

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ jobs:
3333
run: pnpm lint
3434

3535
test:
36-
name: Build and Test on ${{ matrix.os }}
36+
name: Test on ${{ matrix.os }} and NodeJS ${{ matrix.node-version }}
3737
runs-on: ubuntu-latest
3838
timeout-minutes: 15
3939
strategy:
4040
matrix:
41-
node-version: [18]
41+
node-version: [14, 16, 18]
4242
os: [ubuntu-latest, windows-latest, macos-latest]
4343

4444
steps:
@@ -49,7 +49,7 @@ jobs:
4949
with:
5050
version: 7
5151

52-
- name: Use Node.js ${{matrix.node-version}}
52+
- name: Use NodeJS ${{matrix.node-version}}
5353
uses: actions/setup-node@v3
5454
with:
5555
node-version: ${{matrix.node-version}}

.github/workflows/theme-ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Theme CI
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
pull_request:
7+
types: [opened, synchronize]
8+
9+
jobs:
10+
theme-check:
11+
name: Theme Check
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out code
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 2
18+
19+
- uses: pnpm/[email protected]
20+
with:
21+
version: 7
22+
23+
- name: Setup NodeJS environment
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: 16
27+
cache: 'pnpm'
28+
29+
- name: Setup Ruby environment
30+
uses: ruby/setup-ruby@v1
31+
with:
32+
ruby-version: 3.1
33+
bundler: 'latest'
34+
35+
- name: Install Shopify CLI
36+
run: pnpm add -g @shopify/cli @shopify/theme
37+
38+
- name: Install dependencies
39+
run: pnpm install --no-frozen-lockfile
40+
41+
- name: Check
42+
run: pnpm check

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ yarn-error.log*
2424
.env.development.local
2525
.env.test.local
2626
.env.production.local
27+
.devcontainer/devcontainer.env
2728

2829
# turbo
2930
.turbo
3031

3132
# code editor
32-
.devcontainer
3333
.vscode

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,29 @@
1111
],
1212
"scripts": {
1313
"dev": "turbo run dev --filter=*adastra* --parallel",
14-
"dev:tmp": "turbo run dev --filter=template-* --parallel",
15-
"build": "turbo run build --filter=*adastra*",
16-
"build:tmp": "turbo run build --filter=template-*",
14+
"dev:templates": "turbo run dev --filter=template-* --parallel",
15+
"build": "turbo run build --filter=*adastra* --filter=template-*",
1716
"lint": "turbo run lint",
17+
"check": "turbo run check",
1818
"test": "turbo run test --filter=*adastra*",
1919
"test:watch": "turbo run test:watch --filter=*adastra*",
2020
"change:add": "changeset add",
2121
"change:version": "changeset version",
22-
"change:release": "turbo run build lint test && changeset version && changeset publish",
22+
"change:release": "turbo run lint test && changeset version && changeset publish",
2323
"format": "prettier --write \"**/*.{js,ts,tsx,md}\""
2424
},
2525
"devDependencies": {
2626
"@changesets/cli": "^2.26.0",
27-
"@types/node": "^18.11.18",
28-
"@vitest/coverage-c8": "^0.28.4",
27+
"@types/node": "^18.14.0",
28+
"@vitest/coverage-c8": "^0.28.5",
29+
"adastra-prettier-config": "workspace:*",
2930
"eslint": "^7.32.0",
3031
"eslint-config-adastra": "workspace:*",
3132
"prettier": "latest",
32-
"adastra-prettier-config": "workspace:*",
33-
"tsup": "^6.5.0",
33+
"tsup": "^6.6.3",
3434
"turbo": "latest",
3535
"typescript": "^4.9.5",
36-
"vitest": "^0.28.4"
36+
"vitest": "^0.28.5"
3737
},
3838
"packageManager": "[email protected]",
3939
"engines": {

0 commit comments

Comments
 (0)