commit 05a477469d77e40ba92e9bc9335fa8d177c5d6f6 Author: Julien Oculi Date: Sun Jan 14 20:08:59 2024 +0100 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b4bdef --- /dev/null +++ b/.gitignore @@ -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/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..ec0e33e --- /dev/null +++ b/README.md @@ -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. diff --git a/deno.json b/deno.json new file mode 100644 index 0000000..9efc4a9 --- /dev/null +++ b/deno.json @@ -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" + } +} diff --git a/dev.ts b/dev.ts new file mode 100644 index 0000000..1047fef --- /dev/null +++ b/dev.ts @@ -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) diff --git a/fresh.config.ts b/fresh.config.ts new file mode 100644 index 0000000..eb793c5 --- /dev/null +++ b/fresh.config.ts @@ -0,0 +1,3 @@ +import { defineConfig } from '$fresh/server.ts' + +export default defineConfig({}) diff --git a/fresh.gen.ts b/fresh.gen.ts new file mode 100644 index 0000000..d418b56 --- /dev/null +++ b/fresh.gen.ts @@ -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 diff --git a/main.ts b/main.ts new file mode 100644 index 0000000..13d2f71 --- /dev/null +++ b/main.ts @@ -0,0 +1,13 @@ +/// +/// +/// +/// +/// + +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)