-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9351d1
commit 7dd284f
Showing
1 changed file
with
19 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,28 @@ | ||
# Port of Ishtar-Commander as a web app | ||
# Guardian Ghost monorepo | ||
|
||
For now this project is developed using Bun.sh instead of node. However a PNPM lock-file is maintained as dependabot does not currently support bun. It means each update PR needs a manual tweak to also update Bun, but keeps the main benefit of constant update notifications. | ||
As of Decemeber 2023 this is a monorepo built around going beyond the Ishtar Commander mobile applications. | ||
|
||
# React + TypeScript + Vite | ||
The current short term plans are: | ||
|
||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. | ||
- [x] Setup github page and have a running CI. | ||
- [x] Register the new domains. | ||
- [] Learn how to setup a cloudflare D1 database and record CI related data. | ||
- [] Setup a mini stats [dashboard](https://dashboard.guardianghost.com). | ||
- [] Setup a mini [documentation](https://documentation.guardianghost.com) site. MKdocs or Starlight are options. | ||
- [] Start with a React app for the main app. However React Native has potential for hitting mobile, desktop and web. | ||
|
||
Currently, two official plugins are available: | ||
The tech choices are based on interesting new tools to learn. However the main app will use React. | ||
|
||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh | ||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh | ||
## Developer environment | ||
|
||
## Expanding the ESLint configuration | ||
As of December 2023 [Bun](https://bun.sh/) is being used which limits development to Linux and MacOS with Windows support only on [WSL](https://learn.microsoft.com/en-us/windows/wsl/about). However native windows support is excpted to be added to bun any week now. | ||
|
||
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: | ||
Bun was chosen because of it's speed. It provides a package manager and unit test framework that is super fast. However not all tools are compatible with it. For example Dependabot automatic updates are not supported. To work around this the repo also maintains a 'working' [Pnpm](https://pnpm.io) config. Currently it should not be used for dev work, but it's there as a plan B if Bun starts to breakdown as the Monorepo evolves. | ||
|
||
- Configure the top-level `parserOptions` property like this: | ||
## CI / DevOps | ||
The CI is powerered by github acctions and the aims are: | ||
1. Full CI run should only take 1 min for the entire monorepo. | ||
2. CI costs should happily fit inside githubs free tier. That's 2000 minutes a month. But runs under 1min don't seem to count!? | ||
3. Try and use some of the new generation of Rust based tools to keep every stage as fast as possible. | ||
|
||
```js | ||
export default { | ||
// other rules... | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
project: ['./tsconfig.json', './tsconfig.node.json'], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
} | ||
``` | ||
|
||
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` | ||
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` | ||
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list | ||
Dependabot is enabled on the repo and runs everyday. In general the number of dependencies is kept as low as possible. However the aim is to only have items updated on a weekly basis. |