initial commit

This commit is contained in:
Julien Oculi 2024-01-14 20:08:59 +01:00
commit 05a477469d
7 changed files with 132 additions and 0 deletions

11
.gitignore vendored Normal file
View file

@ -0,0 +1,11 @@
# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
# Fresh build directory
_fresh/
# npm dependencies
node_modules/

16
README.md Normal file
View file

@ -0,0 +1,16 @@
# Fresh project
Your new Fresh project is ready to go. You can follow the Fresh "Getting
Started" guide here: https://fresh.deno.dev/docs/getting-started
### Usage
Make sure to install Deno: https://deno.land/manual/getting_started/installation
Then start the project:
```
deno task start
```
This will watch the project directory and restart as necessary.

40
deno.json Normal file
View file

@ -0,0 +1,40 @@
{
"lock": false,
"tasks": {
"check": "deno fmt --check && deno lint && deno check **/*.ts && deno check **/*.tsx",
"cli": "echo \"import '\\$fresh/src/dev/cli.ts'\" | deno run --unstable -A -",
"manifest": "deno task cli manifest $(pwd)",
"start": "deno run -A --watch=static/,routes/ dev.ts",
"build": "deno run -A dev.ts build",
"preview": "deno run -A main.ts",
"update": "deno run -A -r https://fresh.deno.dev/update ."
},
"fmt": {
"singleQuote": true,
"semiColons": false,
"useTabs": true
},
"lint": {
"rules": {
"tags": [
"fresh",
"recommended"
]
}
},
"exclude": [
"**/_fresh/*"
],
"imports": {
"$fresh/": "https://deno.land/x/fresh@1.6.1/",
"preact": "https://esm.sh/preact@10.19.2",
"preact/": "https://esm.sh/preact@10.19.2/",
"@preact/signals": "https://esm.sh/*@preact/signals@1.2.1",
"@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.5.0",
"$std/": "https://deno.land/std@0.208.0/"
},
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "preact"
}
}

8
dev.ts Normal file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env -S deno run -A --watch=static/,routes/
import dev from '$fresh/dev.ts'
import config from './fresh.config.ts'
import '$std/dotenv/load.ts'
await dev(import.meta.url, './main.ts', config)

3
fresh.config.ts Normal file
View file

@ -0,0 +1,3 @@
import { defineConfig } from '$fresh/server.ts'
export default defineConfig({})

41
fresh.gen.ts Normal file
View file

@ -0,0 +1,41 @@
// DO NOT EDIT. This file is generated by Fresh.
// This file SHOULD be checked into source version control.
// This file is automatically updated during development when running `dev.ts`.
import * as $_404 from './routes/_404.tsx'
import * as $_app from './routes/_app.tsx'
import * as $contacts_index from './routes/contacts/index.tsx'
import * as $equipes_id_ from './routes/equipes/[id].tsx'
import * as $equipes_index from './routes/equipes/index.tsx'
import * as $faq_index from './routes/faq/index.tsx'
import * as $index from './routes/index.tsx'
import * as $machines_id_ from './routes/machines/[id].tsx'
import * as $machines_index from './routes/machines/index.tsx'
import * as $profil_admin from './routes/profil/admin.tsx'
import * as $profil_index from './routes/profil/index.tsx'
import * as $projets_id_ from './routes/projets/[id].tsx'
import * as $projets_index from './routes/projets/index.tsx'
import { type Manifest } from '$fresh/server.ts'
const manifest = {
routes: {
'./routes/_404.tsx': $_404,
'./routes/_app.tsx': $_app,
'./routes/contacts/index.tsx': $contacts_index,
'./routes/equipes/[id].tsx': $equipes_id_,
'./routes/equipes/index.tsx': $equipes_index,
'./routes/faq/index.tsx': $faq_index,
'./routes/index.tsx': $index,
'./routes/machines/[id].tsx': $machines_id_,
'./routes/machines/index.tsx': $machines_index,
'./routes/profil/admin.tsx': $profil_admin,
'./routes/profil/index.tsx': $profil_index,
'./routes/projets/[id].tsx': $projets_id_,
'./routes/projets/index.tsx': $projets_index,
},
islands: {},
baseUrl: import.meta.url,
} satisfies Manifest
export default manifest

13
main.ts Normal file
View file

@ -0,0 +1,13 @@
/// <reference no-default-lib="true" />
/// <reference lib="dom" />
/// <reference lib="dom.iterable" />
/// <reference lib="dom.asynciterable" />
/// <reference lib="deno.ns" />
import '$std/dotenv/load.ts'
import { start } from '$fresh/server.ts'
import manifest from './fresh.gen.ts'
import config from './fresh.config.ts'
await start(manifest, config)