Skip to content

Commit

Permalink
update references to libs/ everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
david-crespo committed Feb 23, 2024
1 parent 9b4a6e0 commit 6ab60b9
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The web console has no special privileges as an API consumer. Logging in sets a

## Directory structure

The app is in [`app`](app). You can see the route structure in [`app/routes.tsx`](app/routes.tsx). In [`libs`](libs) we have a [`ui`](libs/ui) dir where the low-level components live and an [`api`](libs/api) dir where we keep the generated API client and a React Query wrapper for it. These directories are aliased in [`tsconfig.json`](tsconfig.json) for easy import from the main app as `@oxide/ui` and `@oxide/api`, respectively.
The app is in [`app`](app). You can see the route structure in [`app/routes.tsx`](app/routes.tsx). Also in [`app`](app) we have a [`ui`](app/ui) dir where the low-level components live and an [`api`](app/api) dir where we keep the generated API client and a React Query wrapper for it. These directories are aliased in [`tsconfig.json`](tsconfig.json) for easy import from the main app as `@oxide/ui` and `@oxide/api`, respectively.

## Development

Expand Down
2 changes: 1 addition & 1 deletion docs/update-pinned-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The API generation script assumes you have `omicron` and `oxide.ts` cloned under
## Instructions

1. Update [`OMICRON_VERSION`](/OMICRON_VERSION) with new Omicron commit hash
1. Update the generated API client by running `npm run gen-api`. This will automatically check out the omicron commit specified as `API_VERSION`. If you forget this step, a safety test in `libs/api` will fail.
1. Update the generated API client by running `npm run gen-api`. This will automatically check out the omicron commit specified as `API_VERSION`. If you forget this step, a safety test in `app/api` will fail.
1. Fix any type errors introduced by changes to the generated code
1. Commit and push to a branch

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"gen-api": "./tools/generate_api_client.sh",
"ladle": "IS_LADLE=1 ladle serve",
"build:ladle": "IS_LADLE=1 ladle build",
"unused-exports": "ts-unused-exports tsconfig.json --ignoreFiles=\\.stories --excludePathsFromReport=\"libs/api/index.ts;libs/ui/index.ts\"",
"postinstall": "patch-package",
"prepare": "husky"
},
Expand Down
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
fontFamily: false,
fontSize: false,
},
content: ['./libs/**/*.{ts,tsx,mdx}', './app/**/*.{ts,tsx}'],
content: ['./app/**/*.{ts,tsx}'],
theme: {
extend: {
screens: {
Expand Down
2 changes: 1 addition & 1 deletion tools/generate_api_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set -o xtrace
# console and have run `npm install` inside oxide.ts/generator

OMICRON_SHA=$(head -n 1 OMICRON_VERSION)
GEN_DIR="$PWD/libs/api/__generated__"
GEN_DIR="$PWD/app/api/__generated__"

# this will be less horrific when the package is published? or maybe not
npm run --silent --prefix ../oxide.ts gen-from $OMICRON_SHA $GEN_DIR
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default defineConfig(({ mode }) => ({
test: {
environment: 'jsdom',
setupFiles: ['test/unit/setup.ts'],
includeSource: ['app/**/*.ts', 'libs/**/*.ts'],
includeSource: ['app/**/*.ts'],
},
}))

Expand Down

0 comments on commit 6ab60b9

Please sign in to comment.