From 1bb72c8eca9590436ac3031b6fb4c107e787a8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Jaenisch?= Date: Mon, 13 May 2024 18:02:45 +0200 Subject: [PATCH] docs: explain the folder structure of src & tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These will help onboarding new contributors, I hope. Signed-off-by: André Jaenisch --- src/README.md | 26 ++++++++++++++++++++++++++ tests/README.md | 14 ++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 src/README.md create mode 100644 tests/README.md diff --git a/src/README.md b/src/README.md new file mode 100644 index 0000000..e917f27 --- /dev/null +++ b/src/README.md @@ -0,0 +1,26 @@ + + +# Source + +These files here provide the server and client code of Anvil. +We try to use TypeScript for an additional level of understandability. +However, components cannot use TypeScript and have to be written in JavaScript +in order to work with the component library. Otherwise their annotation cannot +be parsed. + +- `lib` - Files that can be referenced by [`$lib`](https://kit.svelte.dev/docs/modules#$lib). + We use them for Svelte components, + [internationalisation](https://www.npmjs.com/package/svelte-i18n) and + [server-only modules](https://kit.svelte.dev/docs/modules#$lib-$lib-server). + This approach allows us to also surface a component library. +- `routes` - [SvelteKit routing](https://kit.svelte.dev/docs/routing) +- `README.md` - This document. +- `app.d.ts` - [SvelteKit App type definitions](https://kit.svelte.dev/docs/types#app) +- `app.html` - [SvelteKit page template](https://kit.svelte.dev/docs/project-structure) +- `app.postcss` - Global styles. +- `hooks.server.ts` - [SvelteKit server hooks](https://kit.svelte.dev/docs/hooks#server-hooks) +- `theme.postcss` - Theming. diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..dd10d6f --- /dev/null +++ b/tests/README.md @@ -0,0 +1,14 @@ + + +# tests + +These are the tests for our application. +Right now there are mainly component tests because those are under development. + +- `components` - Components tests matching the folder structure of `src`. +- `README.md` - This document. +- `test.ts` - An example end-to-end test.