Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/deno-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
paths: ["**/*.ts"]

env:
DENO_DIR: deno_cache
DENO_DIR: /tmp/deno_cache

jobs:
deno-check:
Expand All @@ -27,11 +27,10 @@ jobs:
- name: Cache Deno dependencies
uses: actions/cache@v3
with:
key: ${{ hashFiles('src/deno.lock') }}
key: ${{ hashFiles('./deno.lock') }}
path: ${{ env.DENO_DIR }}

- name: Check
working-directory: src
run: |
deno lint
deno check **/*.ts
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
workflow_dispatch:
push:
paths:
- "src/**/*"
- "scripts/**/*"

env:
DENO_DIR: deno_cache
DENO_DIR: /tmp/deno_cache
HAS_USERSTYLES_TOKEN: ${{ secrets.USERSTYLES_TOKEN != '' }}

jobs:
Expand Down Expand Up @@ -38,12 +38,11 @@ jobs:
- name: Cache Deno dependencies
uses: actions/cache@v3
with:
key: ${{ hashFiles('src/deno.lock') }}
key: ${{ hashFiles('./deno.lock') }}
path: ${{ env.DENO_DIR }}

- name: Generate health files
working-directory: ./src
run: deno task generate
run: deno task ci:generate

- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v5
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [main]

env:
DENO_DIR: deno_cache
DENO_DIR: /tmp/deno_cache

jobs:
lint:
Expand All @@ -25,9 +25,8 @@ jobs:
- name: Cache Deno dependencies
uses: actions/cache@v3
with:
key: ${{ hashFiles('src/deno.lock') }}
key: ${{ hashFiles('./deno.lock') }}
path: ${{ env.DENO_DIR }}

- name: Run Lint
working-directory: src
run: deno task lint
9 changes: 4 additions & 5 deletions .github/workflows/maintainers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ on:
workflow_dispatch:
push:
paths:
- "src/userstyles.yml"
- "scripts/userstyles.yml"

env:
DENO_DIR: deno_cache
DENO_DIR: /tmp/deno_cache

jobs:
sync-maintainers:
Expand All @@ -27,12 +27,11 @@ jobs:
- name: Cache Deno dependencies
uses: actions/cache@v3
with:
key: ${{ hashFiles('src/deno.lock') }}
key: ${{ hashFiles('./deno.lock') }}
path: ${{ env.DENO_DIR }}

- name: Sync maintainers
if: ${{ github.repository == 'catppuccin/userstyles' && github.ref == 'refs/heads/main' }}
working-directory: ./src
run: deno task sync-maintainers
run: deno task ci:sync-maintainers
env:
GITHUB_TOKEN: ${{ secrets.USERSTYLES_TOKEN }}
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
},

"deno.enable": true,
"deno.config": "./src/deno.json",

"[less]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand Down
12 changes: 6 additions & 6 deletions src/deno.json → deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"imports": {
"@/": "./",
"@/": "./scripts/",
"std/": "https://deno.land/std@0.206.0/",
"catppuccin-repo/": "https://raw.githubusercontent.com/catppuccin/catppuccin/91d6b5433730103c504dcf43583b594e418ee7c1/",
"@actions/core": "npm:@actions/core@1.10.1",
Expand All @@ -11,10 +11,10 @@
"less": "npm:less@4.2.0"
},
"tasks": {
"generate": "./generate/main.ts",
"lint": "./lint/main.ts",
"lint:fix": "./lint/main.ts --fix",
"sync-maintainers": "./sync-maintainers/main.ts",
"update-types": "deno run -A 'npm:json-schema-to-typescript' ./userstyles.schema.json types/userstyles.d.ts"
"ci:generate": "deno run -A ./scripts/generate/main.ts",
"ci:sync-maintainers": "deno run -A ./scripts/sync-maintainers/main.ts",
"lint": "deno run -A ./scripts/lint/main.ts",
"lint:fix": "deno task lint --fix",
"update-types": "deno run -A 'npm:json-schema-to-typescript' ./scripts/userstyles.schema.json ./scripts/types/userstyles.d.ts"
}
}
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/generate/main.ts → scripts/generate/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const validate = ajv.compile<Metadata>(schema);
const validatePorts = ajv.compile<PortMetadata>(portsSchema);

const userstylesYaml = Deno.readTextFileSync(
path.join(REPO_ROOT, "src/userstyles.yml"),
path.join(REPO_ROOT, "scripts/userstyles.yml"),
);
const userstylesData = parseYaml(userstylesYaml);
if (!validate(userstylesData)) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const ajv = new Ajv.default();
const validate = ajv.compile<UserstylesSchema>(schema);

const userstylesYaml = Deno.readTextFileSync(
path.join(REPO_ROOT, "src/userstyles.yml"),
path.join(REPO_ROOT, "scripts/userstyles.yml"),
);
const userstylesData = parseYaml(userstylesYaml);
if (!validate(userstylesData)) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/userstyles.yml → scripts/userstyles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -479,4 +479,4 @@ userstyles:
answer: "It's available in case you have an OLED display. If you have one, you might want to enable this."
current-maintainers: [*isabelroses]
past-maintainers: [*elkrien]
# yaml-language-server: $schema=https://raw.githubusercontent.com/catppuccin/userstyles/main/src/userstyles.schema.json
# yaml-language-server: $schema=https://raw.githubusercontent.com/catppuccin/userstyles/main/scripts/userstyles.schema.json