Monorepo for Open Airport and related building blocks
Top-level install
pnpm iSet the agency
pnpm agency [agency-name]You can now run any of the apps under packages:
cd packages/open-airport
pnpm startcd packages/open-airport
pnpm agency LawaIf you change branches or want to start over
pnpm clean && pnpm iInstall Pnpm
npm install -g pnpmor
npx pnpm add -g pnpmLocally available packages are linked to node_modules instead of being downloaded from the registry.
One and only one agency can be set at a time. Setting the agency creates a series of symlinks making configuration files and assets (images, css, etc.) for a given config available to be used for each app. Agencies are defined in the agency-config package.
To see what agencies are available look at the list under packages/agency-config/src
To see what the current agency is set to, check one of the symlinks already in place:
ls -al packages/open-airport/publicChange agency:
pnpm agency LawaYou will get no warning if you:
- Don't have an agency defined
- Enter an agency name that isn't defined (misspelling for example)
We use husky and lint-staged to automatically run eslint and prettier on all changed files in a pre-commit hook. If eslint finds any warnings or errors in the changed files the commit will be aborted, and you should resolve the eslint warnings that it reports before attempting to commit again.
eslint can unfortunately take a long time to complete (up to 20-30s depending upon your dev environment), so if you have a lot of smaller commits that you want to complete without linting each individual commit (e.g. on rebase or merge), you can skip the pre-commit hook by running:
git commit --no-verifyThis should be done sparingly however and a full run of prettier and eslint should be performed before submitting a PR, otherwise it will be automatically rejected in CI.
pnpm lintpnpm testCaution: any uncommitted files that fall under .gitignore will get deleted with this command.
pnpm clean && pnpm i