Skip to content

Commit 88b3e98

Browse files
committed
feat: add files from fresh
1 parent 02f77ac commit 88b3e98

15 files changed

Lines changed: 228 additions & 1 deletion

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,15 @@ $RECYCLE.BIN/
7676
*.lnk
7777

7878
# End of https://www.toptal.com/developers/gitignore/api/macos,linux,windows
79+
80+
# dotenv environment variable files
81+
.env
82+
.env.development.local
83+
.env.test.local
84+
.env.production.local
85+
.env.local
86+
87+
# Fresh build directory
88+
_fresh/
89+
# npm dependencies
90+
node_modules/

.vscode/extensions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"recommendations": [
3+
"bradlc.vscode-tailwindcss",
34
"denoland.vscode-deno",
45
"donjayamanne.githistory",
56
"eamodio.gitlens",

.vscode/settings.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@
44
"editor.formatOnSave": true,
55
"editor.renderWhitespace": "all",
66
"editor.rulers": [80, 100],
7+
"editor.defaultFormatter": "denoland.vscode-deno",
8+
"[typescriptreact]": {
9+
"editor.defaultFormatter": "denoland.vscode-deno"
10+
},
11+
"[typescript]": {
12+
"editor.defaultFormatter": "denoland.vscode-deno"
13+
},
14+
"[javascriptreact]": {
15+
"editor.defaultFormatter": "denoland.vscode-deno"
16+
},
17+
"[javascript]": {
18+
"editor.defaultFormatter": "denoland.vscode-deno"
19+
},
20+
"css.customData": [".vscode/tailwind.json"],
721
"files.associations": {
822
"**/.vscode/*.json": "jsonc"
923
},

.vscode/tailwind.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"version": 1.1,
3+
"atDirectives": [
4+
{
5+
"name": "@tailwind",
6+
"description": "Use the `@tailwind` directive to insert Tailwind's `base`, `components`, `utilities` and `screens` styles into your CSS.",
7+
"references": [
8+
{
9+
"name": "Tailwind Documentation",
10+
"url": "https://tailwindcss.com/docs/functions-and-directives#tailwind"
11+
}
12+
]
13+
},
14+
{
15+
"name": "@apply",
16+
"description": "Use the `@apply` directive to inline any existing utility classes into your own custom CSS. This is useful when you find a common utility pattern in your HTML that you’d like to extract to a new component.",
17+
"references": [
18+
{
19+
"name": "Tailwind Documentation",
20+
"url": "https://tailwindcss.com/docs/functions-and-directives#apply"
21+
}
22+
]
23+
},
24+
{
25+
"name": "@responsive",
26+
"description": "You can generate responsive variants of your own classes by wrapping their definitions in the `@responsive` directive:\n```css\n@responsive {\n .alert {\n background-color: #E53E3E;\n }\n}\n```\n",
27+
"references": [
28+
{
29+
"name": "Tailwind Documentation",
30+
"url": "https://tailwindcss.com/docs/functions-and-directives#responsive"
31+
}
32+
]
33+
},
34+
{
35+
"name": "@screen",
36+
"description": "The `@screen` directive allows you to create media queries that reference your breakpoints by **name** instead of duplicating their values in your own CSS:\n```css\n@screen sm {\n /* ... */\n}\n```\n…gets transformed into this:\n```css\n@media (min-width: 640px) {\n /* ... */\n}\n```\n",
37+
"references": [
38+
{
39+
"name": "Tailwind Documentation",
40+
"url": "https://tailwindcss.com/docs/functions-and-directives#screen"
41+
}
42+
]
43+
},
44+
{
45+
"name": "@variants",
46+
"description": "Generate `hover`, `focus`, `active` and other **variants** of your own utilities by wrapping their definitions in the `@variants` directive:\n```css\n@variants hover, focus {\n .btn-brand {\n background-color: #3182CE;\n }\n}\n```\n",
47+
"references": [
48+
{
49+
"name": "Tailwind Documentation",
50+
"url": "https://tailwindcss.com/docs/functions-and-directives#variants"
51+
}
52+
]
53+
}
54+
]
55+
}

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,18 @@ The name is forged from two truths:
99
- Pledge — The act of binding oneself to a cause, as a knight might kneel before their liege, or a crafter might take up tools in service of the greater good.
1010
- Ledger — The record. Eternal, impartial, and sacred. It holds the names of those who have sworn themselves to the Order.
1111

12-
Together, they form *Pledger*: a place where purpose is written and identity is honored.
12+
Together, they form _Pledger_: a place where purpose is written and identity is honored.
1313

1414
Behind every request lies a story; behind every name, a vow. These names are kept in a living record of all who have answered the call, whether active in the field or sleeping in silence, waiting to rise once more.
1515

16+
## Getting Started
17+
18+
Just run the following command to start the local server:
19+
20+
```bash
21+
deno task serve
22+
```
23+
1624
## Contributing
1725

1826
**Imposter syndrome disclaimer**: We want your help. No, really.

deno.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"lock": false,
3+
"tasks": {
4+
"check": "deno fmt --check && deno lint && deno check **/*.ts && deno check **/*.tsx",
5+
"cli": "echo \"import '\\$fresh/src/dev/cli.ts'\" | deno run --unstable -A -",
6+
"manifest": "deno task cli manifest $(pwd)",
7+
"start": "deno run -A --watch=static/,routes/ dev.ts",
8+
"build": "deno run -A dev.ts build",
9+
"preview": "deno run -A main.ts",
10+
"update": "deno run -A -r https://fresh.deno.dev/update ."
11+
},
12+
"lint": {
13+
"rules": {
14+
"tags": ["fresh", "recommended"]
15+
}
16+
},
17+
"exclude": ["**/_fresh/*"],
18+
"imports": {
19+
"$fresh/": "https://deno.land/x/fresh@1.7.3/",
20+
"preact": "https://esm.sh/preact@10.22.0",
21+
"preact/": "https://esm.sh/preact@10.22.0/",
22+
"@preact/signals": "https://esm.sh/*@preact/signals@1.2.2",
23+
"@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.5.1",
24+
"tailwindcss": "npm:tailwindcss@3.4.1",
25+
"tailwindcss/": "npm:/tailwindcss@3.4.1/",
26+
"tailwindcss/plugin": "npm:/tailwindcss@3.4.1/plugin.js",
27+
"$std/": "https://deno.land/std@0.216.0/"
28+
},
29+
"compilerOptions": {
30+
"jsx": "react-jsx",
31+
"jsxImportSource": "preact"
32+
},
33+
"nodeModulesDir": "auto"
34+
}

dev.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env -S deno run -A --watch=static/,routes/
2+
3+
import dev from "$fresh/dev.ts";
4+
import config from "./fresh.config.ts";
5+
6+
import "$std/dotenv/load.ts";
7+
8+
await dev(import.meta.url, "./main.ts", config);

fresh.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { defineConfig } from "$fresh/server.ts";
2+
import tailwind from "$fresh/plugins/tailwind.ts";
3+
4+
export default defineConfig({
5+
plugins: [tailwind()],
6+
});

fresh.gen.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// DO NOT EDIT. This file is generated by Fresh.
2+
// This file SHOULD be checked into source version control.
3+
// This file is automatically updated during development when running `dev.ts`.
4+
5+
import * as $_404 from "./routes/_404.tsx";
6+
import * as $_app from "./routes/_app.tsx";
7+
import * as $index from "./routes/index.tsx";
8+
9+
import type { Manifest } from "$fresh/server.ts";
10+
11+
const manifest = {
12+
routes: {
13+
"./routes/_404.tsx": $_404,
14+
"./routes/_app.tsx": $_app,
15+
"./routes/index.tsx": $index,
16+
},
17+
islands: {},
18+
baseUrl: import.meta.url,
19+
} satisfies Manifest;
20+
21+
export default manifest;

main.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/// <reference no-default-lib="true" />
2+
/// <reference lib="dom" />
3+
/// <reference lib="dom.iterable" />
4+
/// <reference lib="dom.asynciterable" />
5+
/// <reference lib="deno.ns" />
6+
7+
import "$std/dotenv/load.ts";
8+
9+
import { start } from "$fresh/server.ts";
10+
import manifest from "./fresh.gen.ts";
11+
import config from "./fresh.config.ts";
12+
13+
await start(manifest, config);

0 commit comments

Comments
 (0)