Skip to content

Commit 790e7cb

Browse files
authored
ci: move src/ -> scripts/, deno.json to repo root (catppuccin#332)
1 parent f977c5a commit 790e7cb

21 files changed

Lines changed: 21 additions & 26 deletions

β€Ž.github/workflows/deno-check.ymlβ€Ž

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
paths: ["**/*.ts"]
1010

1111
env:
12-
DENO_DIR: deno_cache
12+
DENO_DIR: /tmp/deno_cache
1313

1414
jobs:
1515
deno-check:
@@ -27,11 +27,10 @@ jobs:
2727
- name: Cache Deno dependencies
2828
uses: actions/cache@v3
2929
with:
30-
key: ${{ hashFiles('src/deno.lock') }}
30+
key: ${{ hashFiles('./deno.lock') }}
3131
path: ${{ env.DENO_DIR }}
3232

3333
- name: Check
34-
working-directory: src
3534
run: |
3635
deno lint
3736
deno check **/*.ts

β€Ž.github/workflows/generate.ymlβ€Ž

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ on:
44
workflow_dispatch:
55
push:
66
paths:
7-
- "src/**/*"
7+
- "scripts/**/*"
88

99
env:
10-
DENO_DIR: deno_cache
10+
DENO_DIR: /tmp/deno_cache
1111
HAS_USERSTYLES_TOKEN: ${{ secrets.USERSTYLES_TOKEN != '' }}
1212

1313
jobs:
@@ -38,12 +38,11 @@ jobs:
3838
- name: Cache Deno dependencies
3939
uses: actions/cache@v3
4040
with:
41-
key: ${{ hashFiles('src/deno.lock') }}
41+
key: ${{ hashFiles('./deno.lock') }}
4242
path: ${{ env.DENO_DIR }}
4343

4444
- name: Generate health files
45-
working-directory: ./src
46-
run: deno task generate
45+
run: deno task ci:generate
4746

4847
- name: Push changes
4948
uses: stefanzweifel/git-auto-commit-action@v5

β€Ž.github/workflows/lint.ymlβ€Ž

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [main]
88

99
env:
10-
DENO_DIR: deno_cache
10+
DENO_DIR: /tmp/deno_cache
1111

1212
jobs:
1313
lint:
@@ -25,9 +25,8 @@ jobs:
2525
- name: Cache Deno dependencies
2626
uses: actions/cache@v3
2727
with:
28-
key: ${{ hashFiles('src/deno.lock') }}
28+
key: ${{ hashFiles('./deno.lock') }}
2929
path: ${{ env.DENO_DIR }}
3030

3131
- name: Run Lint
32-
working-directory: src
3332
run: deno task lint

β€Ž.github/workflows/maintainers.ymlβ€Ž

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ on:
44
workflow_dispatch:
55
push:
66
paths:
7-
- "src/userstyles.yml"
7+
- "scripts/userstyles.yml"
88

99
env:
10-
DENO_DIR: deno_cache
10+
DENO_DIR: /tmp/deno_cache
1111

1212
jobs:
1313
sync-maintainers:
@@ -27,12 +27,11 @@ jobs:
2727
- name: Cache Deno dependencies
2828
uses: actions/cache@v3
2929
with:
30-
key: ${{ hashFiles('src/deno.lock') }}
30+
key: ${{ hashFiles('./deno.lock') }}
3131
path: ${{ env.DENO_DIR }}
3232

3333
- name: Sync maintainers
3434
if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' }}
35-
working-directory: ./src
36-
run: deno task sync-maintainers
35+
run: deno task ci:sync-maintainers
3736
env:
3837
GITHUB_TOKEN: ${{ secrets.USERSTYLES_TOKEN }}

β€Ž.vscode/settings.jsonβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
},
55

66
"deno.enable": true,
7-
"deno.config": "./src/deno.json",
87

98
"[less]": {
109
"editor.defaultFormatter": "esbenp.prettier-vscode"
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"imports": {
3-
"@/": "./",
3+
"@/": "./scripts/",
44
"std/": "https://deno.land/std@0.206.0/",
55
"catppuccin-repo/": "https://raw.githubusercontent.com/catppuccin/catppuccin/91d6b5433730103c504dcf43583b594e418ee7c1/",
66
"@actions/core": "npm:@actions/core@1.10.1",
@@ -11,10 +11,10 @@
1111
"less": "npm:less@4.2.0"
1212
},
1313
"tasks": {
14-
"generate": "./generate/main.ts",
15-
"lint": "./lint/main.ts",
16-
"lint:fix": "./lint/main.ts --fix",
17-
"sync-maintainers": "./sync-maintainers/main.ts",
18-
"update-types": "deno run -A 'npm:json-schema-to-typescript' ./userstyles.schema.json types/userstyles.d.ts"
14+
"ci:generate": "deno run -A ./scripts/generate/main.ts",
15+
"ci:sync-maintainers": "deno run -A ./scripts/sync-maintainers/main.ts",
16+
"lint": "deno run -A ./scripts/lint/main.ts",
17+
"lint:fix": "deno task lint --fix",
18+
"update-types": "deno run -A 'npm:json-schema-to-typescript' ./scripts/userstyles.schema.json ./scripts/types/userstyles.d.ts"
1919
}
2020
}
File renamed without changes.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const validate = ajv.compile<Metadata>(schema);
4141
const validatePorts = ajv.compile<PortMetadata>(portsSchema);
4242

4343
const userstylesYaml = Deno.readTextFileSync(
44-
path.join(REPO_ROOT, "src/userstyles.yml"),
44+
path.join(REPO_ROOT, "scripts/userstyles.yml"),
4545
);
4646
const userstylesData = parseYaml(userstylesYaml);
4747
if (!validate(userstylesData)) {
File renamed without changes.

0 commit comments

Comments
Β (0)