docs: explain the folder structure of src & tests
These will help onboarding new contributors, I hope. Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
This commit is contained in:
parent
05158eb10c
commit
1bb72c8eca
2 changed files with 40 additions and 0 deletions
26
src/README.md
Normal file
26
src/README.md
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
<!--
|
||||||
|
SPDX-FileCopyrightText: 2023 Pere Lev
|
||||||
|
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
-->
|
||||||
|
|
||||||
|
# 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.
|
14
tests/README.md
Normal file
14
tests/README.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<!--
|
||||||
|
SPDX-FileCopyrightText: 2023 Pere Lev
|
||||||
|
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
-->
|
||||||
|
|
||||||
|
# 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.
|
Loading…
Reference in a new issue