From 535cc6b3d949e6787d453550d2797f354773b5ea Mon Sep 17 00:00:00 2001 From: Marco Pasqualetti <24919330+marcalexiei@users.noreply.github.com> Date: Thu, 14 Nov 2024 10:30:21 +0100 Subject: [PATCH] chore: add `apps/documentation` to `pnpm` workspaces (#96) --- .github/workflows/ci-documentation.yml | 17 ++-- .github/workflows/deploy-documentation.yml | 7 +- .github/workflows/typescript.yml | 78 +++++++++---------- apps/documentation/package.json | 19 ++--- package.json | 27 ++++--- .../fs-router-vite-plugin/.prettierignore | 2 + pnpm-workspace.yaml | 6 +- 7 files changed, 71 insertions(+), 85 deletions(-) create mode 100644 packages/fs-router-vite-plugin/.prettierignore diff --git a/.github/workflows/ci-documentation.yml b/.github/workflows/ci-documentation.yml index 8dfb2845..ca0eb6a7 100644 --- a/.github/workflows/ci-documentation.yml +++ b/.github/workflows/ci-documentation.yml @@ -15,9 +15,6 @@ jobs: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name timeout-minutes: 15 runs-on: ubuntu-latest - defaults: - run: - working-directory: ./apps/documentation steps: - name: Check out code @@ -40,18 +37,16 @@ jobs: run: npm i -g pnpm - name: Install dependencies - run: pnpm install --ignore-workspace + run: pnpm install - name: Build project + working-directory: ./apps/documentation run: tuono build --static fmt-lint-and-types: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name runs-on: ubuntu-latest timeout-minutes: 15 - defaults: - run: - working-directory: ./apps/documentation steps: - name: Check out code @@ -63,13 +58,13 @@ jobs: run: npm i -g pnpm - name: Install dependencies - run: pnpm install --ignore-workspace + run: pnpm install - name: Check formatting - run: pnpm format:check + run: pnpm docs:format:check - name: Lint - run: pnpm lint + run: pnpm docs:lint - name: Types - run: pnpm types + run: pnpm docs:types diff --git a/.github/workflows/deploy-documentation.yml b/.github/workflows/deploy-documentation.yml index 7dac6eff..f940479f 100644 --- a/.github/workflows/deploy-documentation.yml +++ b/.github/workflows/deploy-documentation.yml @@ -10,9 +10,7 @@ on: jobs: deploy-documentation: runs-on: ubuntu-latest - defaults: - run: - working-directory: ./apps/documentation + env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -37,9 +35,10 @@ jobs: run: npm i -g pnpm - name: Install dependencies - run: pnpm install --ignore-workspace + run: pnpm install - name: Build project + working-directory: ./apps/documentation run: tuono build --static - name: Deploy diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index a6160660..8ec700ec 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript.yml @@ -15,52 +15,52 @@ jobs: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name timeout-minutes: 15 runs-on: ubuntu-latest - - steps: - - name: Check out code - uses: actions/checkout@v4 - with: - fetch-depth: 2 - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: 20 + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + fetch-depth: 2 - - name: Install pnpm - run: npm i -g pnpm - - - name: Install dependencies - run: pnpm install - - - name: Build project - run: pnpm build + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: 20 - - name: Test project - run: pnpm test + - name: Install pnpm + run: npm i -g pnpm + + - name: Install dependencies + run: pnpm install + + - name: Build project + run: pnpm build + + - name: Test project + run: pnpm test fmt-lint-and-types: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name runs-on: ubuntu-latest timeout-minutes: 15 - steps: - - name: Check out code - uses: actions/checkout@v4 - with: - fetch-depth: 2 - - - name: Install pnpm - run: npm i -g pnpm - - - name: Install dependencies - run: pnpm install + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + fetch-depth: 2 - - name: Check formatting - run: pnpm format:check - - - name: Lint - run: pnpm lint - - - name: Types - run: pnpm types + - name: Install pnpm + run: npm i -g pnpm + + - name: Install dependencies + run: pnpm install + + - name: Check formatting + run: pnpm format:check + + - name: Lint + run: pnpm lint + + - name: Types + run: pnpm types diff --git a/apps/documentation/package.json b/apps/documentation/package.json index 9e37112d..eaa27937 100644 --- a/apps/documentation/package.json +++ b/apps/documentation/package.json @@ -1,7 +1,8 @@ { - "name": "tuono", - "description": "The react/rust fullstack framework", + "name": "documentation", + "description": "The react/rust fullstack framework documentation", "version": "0.0.1", + "private": true, "scripts": { "lint": "eslint --ext .ts,.tsx ./src -c .eslintrc", "format": "prettier -u --write --ignore-unknown './src/**/*'", @@ -17,24 +18,14 @@ "clsx": "^2.1.1", "react": "18.3.1", "react-dom": "18.3.1", - "tuono": "0.12.0" + "tuono": "npm:tuono@0.12.0" }, "devDependencies": { "@types/mdx": "^2.0.13", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", - "@typescript-eslint/eslint-plugin": "^8.0.0", - "@typescript-eslint/parser": "^8.0.0", - "eslint": "^8.56.0", - "eslint-config-prettier": "^9.1.0", - "eslint-import-resolver-typescript": "^3.6.1", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-react": "^7.33.2", - "eslint-plugin-react-hooks": "^5.0.0", "postcss": "^8.4.39", "postcss-preset-mantine": "^1.17.0", - "postcss-simple-vars": "^7.0.1", - "prettier": "^3.2.4", - "typescript": "^5.5.4" + "postcss-simple-vars": "^7.0.1" } } diff --git a/package.json b/package.json index aed55b50..9b54fa08 100644 --- a/package.json +++ b/package.json @@ -2,21 +2,20 @@ "name": "workspace", "packageManager": "pnpm@9.13.0+sha512.beb9e2a803db336c10c9af682b58ad7181ca0fbd0d4119f2b33d5f2582e96d6c0d93c85b23869295b765170fbdaa92890c0da6ada457415039769edf3c959efe", "scripts": { - "dev": "turbo dev", - "build": "turbo build --filter tuono", - "lint": "turbo lint", - "format": "turbo format", - "format:check": "turbo format:check", - "types": "turbo types --filter tuono", - "test": "turbo test", - "test:watch": "turbo test:watch" + "dev": "turbo dev --filter=./packages/*", + "build": "turbo build --filter=./packages/*", + "lint": "turbo lint --filter=./packages/*", + "format": "turbo format --filter=./packages/*", + "format:check": "turbo format:check --filter=./packages/*", + "types": "turbo types --filter=./packages/*", + "test": "turbo test --filter=./packages/*", + "test:watch": "turbo test:watch --filter=./packages/*", + "docs:lint": "turbo lint --filter=documentation", + "docs:format": "turbo format --filter=documentation", + "docs:format:check": "turbo format:check --filter=documentation", + "docs:types": "turbo types --filter=documentation", + "check-all": "turbo build lint format:check types" }, - "workspaces": [ - "tuono", - "tuono-lazy-fn-vite-plugin", - "tuono-fs-router-vite-plugin", - "tuono-router" - ], "author": "Valerio Ageno", "license": "MIT", "devDependencies": { diff --git a/packages/fs-router-vite-plugin/.prettierignore b/packages/fs-router-vite-plugin/.prettierignore new file mode 100644 index 00000000..dee70d2f --- /dev/null +++ b/packages/fs-router-vite-plugin/.prettierignore @@ -0,0 +1,2 @@ +dist +pnpm-lock.yaml diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 582a1f3b..51d152cb 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,4 +1,4 @@ packages: - - "packages/*" - - "!**/examples/**" - - "!**/apps/**" + - 'packages/*' + - 'apps/*' + - '!**/examples/**'