diff --git a/.github/workflows/turbo-ci.yml b/.github/workflows/turbo-ci.yml index ba62ac5a54..b0d4e4ad3c 100644 --- a/.github/workflows/turbo-ci.yml +++ b/.github/workflows/turbo-ci.yml @@ -88,5 +88,5 @@ jobs: - name: 🔍 Verify intl:extract has been run run: | - pnpm intl:extract + pnpm turbo run intl:extract --force git diff --exit-code --color */*/src/locales/en-US/index.json diff --git a/CLAUDE.md b/CLAUDE.md index 0ab19bc52c..42161ddf3e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -16,13 +16,13 @@ Both have access to our dependency injection framework, examples as seen in `pac ### Website (apps/frontend) -Before a pull request can be opened for the website, `pnpm web:fix` and `pnpm web:intl:extract` must be run, otherwise CI will fail. +Before a pull request can be opened for the website, run `pnpm prepr:frontend:web` from the root folder, otherwise CI will fail. To run a development version of the frontend, you must first copy over the relevant `.env` template file (prod, staging or local, usually prod) within the `apps/frontend` folder into `apps/frontend/.env`. Then you can run the frontend by running `pnpm web:dev` in the root folder. ### App Frontend (apps/app-frontend) -Before a pull request can be opened for the website, you must CD into the `app-frontend` folder; `pnpm fix` and `pnpm intl:extract` must be run, otherwise CI will fail. +Before a pull request can be opened for the app frontend, run `pnpm prepr:frontend:app` from the root folder, otherwise CI will fail. To run a development version of the app frontend, you must first copy over the relevant `.env` template file (prod, staging or local, usually prod) within `packages/app-lib` into `packages/app-lib/.env`. Then you must run the app itself by running `pnpm app:dev` in the root folder. diff --git a/package.json b/package.json index f9c7d23434..6ae915412d 100644 --- a/package.json +++ b/package.json @@ -3,29 +3,24 @@ "version": "0.0.0", "private": true, "scripts": { - "ui:intl:extract": "pnpm run --filter=@modrinth/ui intl:extract", "web:dev": "turbo run dev --filter=@modrinth/frontend", "web:build": "turbo run build --filter=@modrinth/frontend", - "web:fix": "turbo run fix --filter=@modrinth/frontend", - "web:intl:extract": "pnpm run --filter=@modrinth/frontend intl:extract", "app:dev": "turbo run dev --filter=@modrinth/app", - "docs:dev": "turbo run dev --filter=@modrinth/docs", "app:build": "turbo run build --filter=@modrinth/app", - "app:fix": "turbo run fix --filter=@modrinth/app", - "app:intl:extract": "pnpm run --filter=@modrinth/app-frontend intl:extract", - "blog:fix": "turbo run fix --filter=@modrinth/blog", + "docs:dev": "turbo run dev --filter=@modrinth/docs", "pages:build": "NITRO_PRESET=cloudflare-pages pnpm --filter frontend run build", - "moderation:fix": "turbo run fix --filter=@modrinth/moderation", - "moderation:intl:extract": "pnpm run --filter=@modrinth/moderation intl:extract", "build": "turbo run build --continue", "lint": "turbo run lint lint:ancillary --continue", "lint:ancillary": "prettier --check .github *.*", "test": "turbo run test --continue", "fix": "turbo run fix fix:ancillary --continue", - "fix:frontend": "turbo run fix --continue --parallel --filter='!@modrinth/labrinth' --filter='!@modrinth/app' --filter='!@modrinth/app-lib' --filter='!@modrinth/daedalus' --filter='!@modrinth/daedalus_client' --filter='!@modrinth/app-playground'", "fix:ancillary": "prettier --write .github *.*", "ci": "turbo run lint test --continue", - "intl:extract": "pnpm ui:intl:extract && pnpm web:intl:extract && pnpm app:intl:extract && pnpm moderation:intl:extract" + "prepr": "turbo run prepr --continue", + "prepr:frontend": "turbo run prepr --filter=@modrinth/frontend --filter=@modrinth/app-frontend", + "prepr:frontend:lib": "turbo run prepr --filter=@modrinth/ui --filter=@modrinth/moderation --filter=@modrinth/assets --filter=@modrinth/blog --filter=@modrinth/api-client --filter=@modrinth/utils --filter=@modrinth/tooling-config", + "prepr:frontend:web": "turbo run prepr --filter=@modrinth/frontend", + "prepr:frontend:app": "turbo run prepr --filter=@modrinth/app-frontend" }, "devDependencies": { "@modrinth/tooling-config": "workspace:*", diff --git a/turbo.jsonc b/turbo.jsonc index b9aeb835d4..aec2b3438c 100644 --- a/turbo.jsonc +++ b/turbo.jsonc @@ -1,6 +1,11 @@ { "$schema": "./node_modules/turbo/schema.json", "concurrency": "100%", + "globalDependencies": [ + "packages/tooling-config/**", + "!packages/tooling-config/.turbo/**", + "!packages/tooling-config/node_modules/**" + ], "tasks": { "build": { "dependsOn": ["^build"], @@ -60,11 +65,13 @@ "NEXTEST_*" ] }, - "fix": { - "cache": false - }, + "fix": {}, "fix:ancillary": { "cache": false + }, + "intl:extract": {}, + "prepr": { + "dependsOn": ["^prepr", "fix", "intl:extract"] } } }