From 6ab60b9b6016ffb4fa679411a75a2a2bc8788d3d Mon Sep 17 00:00:00 2001 From: David Crespo Date: Fri, 23 Feb 2024 15:56:14 -0600 Subject: [PATCH] update references to libs/ everywhere --- README.md | 2 +- docs/update-pinned-api.md | 2 +- package.json | 1 - tailwind.config.js | 2 +- tools/generate_api_client.sh | 2 +- vite.config.ts | 2 +- 6 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d3fb5d570e..ff880bc7de 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/update-pinned-api.md b/docs/update-pinned-api.md index 0748f80545..e5fa4c4f63 100644 --- a/docs/update-pinned-api.md +++ b/docs/update-pinned-api.md @@ -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 diff --git a/package.json b/package.json index 4e6a152cae..3d9a5e6608 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/tailwind.config.js b/tailwind.config.js index 86b2ee00ec..8f747b96aa 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -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: { diff --git a/tools/generate_api_client.sh b/tools/generate_api_client.sh index fcaeaef03c..3955b605c2 100755 --- a/tools/generate_api_client.sh +++ b/tools/generate_api_client.sh @@ -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 diff --git a/vite.config.ts b/vite.config.ts index 16ab259480..3d7fda0409 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -145,7 +145,7 @@ export default defineConfig(({ mode }) => ({ test: { environment: 'jsdom', setupFiles: ['test/unit/setup.ts'], - includeSource: ['app/**/*.ts', 'libs/**/*.ts'], + includeSource: ['app/**/*.ts'], }, }))