Skip to content

Commit df034bf

Browse files
committed
Swap node for deno (#140)
1 parent ad9077d commit df034bf

36 files changed

+313
-316
lines changed

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ on:
99

1010
jobs:
1111
build:
12-
uses: janosh/workflows/.github/workflows/nodejs-gh-pages.yml@main
12+
uses: janosh/workflows/.github/workflows/deno-gh-pages.yml@main
1313
with:
1414
working-directory: site

.github/workflows/link-check-config.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/new-site.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ on:
99

1010
jobs:
1111
tests:
12-
uses: janosh/workflows/.github/workflows/npm-test.yml@main
12+
uses: janosh/workflows/.github/workflows/deno-test.yml@main
1313
with:
14-
working-directory: site
1514
test-cmd: ''
16-
install-e2e: npx playwright install chromium
17-
e2e-test-cmd: npx playwright test tests/*.ts
15+
e2e-test-cmd: npx playwright test
16+
e2e-install-cmd: npx playwright install chromium
17+
working-directory: site

.pre-commit-config.yaml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ci:
22
autoupdate_schedule: quarterly
3-
skip: [eslint]
3+
skip: [eslint, deno-lint, deno-fmt]
44

55
default_stages: [pre-commit]
66

@@ -20,16 +20,6 @@ repos:
2020
- id: file-contents-sorter
2121
files: ^tools\.yml$
2222

23-
- repo: https://github.com/pre-commit/mirrors-prettier
24-
rev: v4.0.0-alpha.8
25-
hooks:
26-
- id: prettier
27-
args: [--config, site/.prettierrc.yml, --write] # edit files in-place
28-
additional_dependencies:
29-
- prettier
30-
- prettier-plugin-svelte
31-
- svelte
32-
3323
- repo: https://github.com/adrienverge/yamllint
3424
rev: v1.37.1
3525
hooks:
@@ -110,3 +100,18 @@ repos:
110100
entry: .github/format_urls.py
111101
language: python
112102
files: ^(sites.yml|readme.md|.github/format_urls.py)$
103+
104+
- repo: local
105+
hooks:
106+
- id: deno-fmt
107+
name: Deno format
108+
entry: deno fmt
109+
types_or: [file]
110+
language: system
111+
args: [--config, site/deno.jsonc]
112+
- id: deno-lint
113+
name: Deno lint
114+
entry: deno lint
115+
types_or: [file]
116+
args: [--config, site/deno.jsonc, --permit-no-files, --fix]
117+
language: system

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Awesome examples of SvelteKit in the wild. Visit **[janosh.github.io/awesome-sve
9999
uses: [Huggingface Inference], [Huggingface Hub], [Tailwind]
100100

101101
1. **[shadcn-svelte](https://shadcn-svelte.com)** 
102-
[[code](https://github.com/huntabyte/shadcn-svelte/tree/main/sites/docs)] 
102+
[[code](https://github.com/huntabyte/shadcn-svelte/tree/96e8866/docs)] 
103103
<a href="https://github.com/huntabyte/shadcn-svelte/stargazers">
104104
<img src="https://img.shields.io/github/stars/huntabyte/shadcn-svelte?logo=github" alt="GitHub stars" valign="middle">
105105
</a>
@@ -228,7 +228,7 @@ Awesome examples of SvelteKit in the wild. Visit **[janosh.github.io/awesome-sve
228228

229229
uses: [MDsveX], [TypeScript], [PostCSS], [Tailwind], [cssnano], [Jest], [rehype]
230230

231-
1. **[Svelte Commerce](https://demo.litekart.in)**&nbsp;
231+
1. **[Svelte Commerce](https://arialshop.com)**&nbsp;
232232
[[code](https://github.com/itswadesh/svelte-commerce)]&ensp;
233233
<a href="https://github.com/itswadesh/svelte-commerce/stargazers">
234234
<img src="https://img.shields.io/github/stars/itswadesh/svelte-commerce?logo=github" alt="GitHub stars" valign="middle">

site/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
GH_TOKEN=ghp_...
1+
GH_TOKEN=github_pat_...

site/.prettierrc.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

site/deno.jsonc

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"tasks": {
3+
"dev": "deno run -A --node-modules-dir npm:vite dev",
4+
"build": "deno run -A --node-modules-dir npm:vite build",
5+
"preview": "deno run -A --node-modules-dir npm:vite preview",
6+
"serve": "deno task build && deno task preview",
7+
"test": "deno task vitest && deno task e2e",
8+
"vitest": "deno run -A --node-modules-dir npm:vitest run tests/unit/**/*.ts",
9+
"e2e": "npx playwright test",
10+
"test:install": "npx playwright install chromium",
11+
"package": "svelte-package"
12+
},
13+
"lock": false,
14+
"imports": {
15+
"$lib": "./src/lib/index.ts",
16+
"$lib/": "./src/lib/"
17+
},
18+
"lint": {
19+
"rules": {
20+
"tags": ["recommended"],
21+
"include": [
22+
"ban-unused-ignore",
23+
"default-param-last",
24+
"eqeqeq",
25+
"guard-for-in",
26+
"jsx-key",
27+
"jsx-no-duplicate-props",
28+
"jsx-no-useless-fragment",
29+
"no-async-promise-executor",
30+
"no-await-in-loop",
31+
// "no-boolean-literal-for-arguments", // TODO only disable this in test files or even just for .toBe(true)
32+
"no-const-assign",
33+
"no-eval",
34+
"no-explicit-any",
35+
"no-non-null-asserted-optional-chain",
36+
"no-non-null-assertion",
37+
"no-self-compare",
38+
"no-sparse-arrays",
39+
"no-sync-fn-in-async-fn",
40+
"no-throw-literal",
41+
"no-unused-vars",
42+
"no-useless-rename",
43+
"prefer-const",
44+
"require-await",
45+
"single-var-declarator"
46+
],
47+
"exclude": ["no-sloppy-imports"]
48+
}
49+
},
50+
"fmt": {
51+
"indentWidth": 2,
52+
"lineWidth": 90,
53+
"semiColons": false,
54+
"singleQuote": true,
55+
"proseWrap": "preserve"
56+
},
57+
"unstable": ["fmt-component", "sloppy-imports"],
58+
"compilerOptions": {
59+
"lib": ["dom", "esnext"]
60+
},
61+
"nodeModulesDir": "auto"
62+
}

site/package.json

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,28 @@
88
"version": "0.1.0",
99
"type": "module",
1010
"bugs": "https://github.com/janosh/awesome-sveltekit/issues",
11-
"scripts": {
12-
"dev": "vite dev",
13-
"build": "vite build",
14-
"preview": "vite preview",
15-
"serve": "vite build && vite preview",
16-
"check": "svelte-check",
17-
"test": "playwright test tests/*.test.ts"
18-
},
1911
"devDependencies": {
2012
"@iconify/svelte": "^5.0.0",
21-
"@playwright/test": "^1.52.0",
13+
"@playwright/test": "^1.54.1",
2214
"@rollup/plugin-yaml": "^4.1.2",
23-
"@stylistic/eslint-plugin": "^4.2.0",
15+
"@stylistic/eslint-plugin": "^5.1.0",
2416
"@sveltejs/adapter-static": "^3.0.8",
25-
"@sveltejs/kit": "^2.21.0",
26-
"@sveltejs/vite-plugin-svelte": "^5.0.3",
27-
"dotenv": "^16.5.0",
28-
"eslint": "^9.27.0",
29-
"eslint-plugin-svelte": "^3.8.1",
17+
"@sveltejs/kit": "^2.22.5",
18+
"@sveltejs/vite-plugin-svelte": "^6.0.0",
19+
"eslint": "^9.31.0",
20+
"eslint-plugin-svelte": "^3.10.1",
3021
"js-yaml": "^4.1.0",
31-
"marked": "^15.0.11",
32-
"prettier": "^3.5.3",
33-
"prettier-plugin-svelte": "^3.4.0",
34-
"puppeteer": "^24.8.2",
35-
"sharp": "^0.34.1",
36-
"svelte": "^5.30.2",
37-
"svelte-check": "^4.2.1",
38-
"svelte-multiselect": "11.1.0",
22+
"marked": "^16.0.0",
23+
"puppeteer": "^24.12.1",
24+
"sharp": "^0.34.3",
25+
"svelte": "^5.35.6",
26+
"svelte-check": "^4.2.2",
27+
"svelte-multiselect": "11.2.2",
3928
"svelte-preprocess": "^6.0.3",
40-
"svelte-zoo": "^0.4.18",
41-
"svelte2tsx": "^0.7.39",
29+
"svelte2tsx": "^0.7.40",
4230
"typescript": "5.8.3",
43-
"typescript-eslint": "^8.32.1",
44-
"vite": "^6.3.5"
31+
"typescript-eslint": "^8.36.0",
32+
"vite": "^7.0.4"
4533
},
4634
"keywords": [
4735
"sveltekit",

0 commit comments

Comments
 (0)