diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b6bc7752..a246e0b69 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,6 +35,9 @@ jobs: - run: | cd packages/bento-design-system pnpm version --no-git-tag-version --new-version ${{ github.ref_name }} + new_version=$(cat package.json | jq -r '.version') + cd ../../templates/react-router-monorepo/libs/design-system + jq '.dependencies["@buildo/bento-design-system"] = "'${new_version}'"' package.json > package.json.tmp && mv package.json.tmp package.json - name: Commit & Push changes uses: actions-js/push@master diff --git a/templates/README.md b/templates/README.md new file mode 100644 index 000000000..f2e1a2b31 --- /dev/null +++ b/templates/README.md @@ -0,0 +1,19 @@ +# Bento project templates + +This directory contains project templates that can be used to bootstrap new projects using Bento. + +## How to use a template + +```bash +pnpx degit buildo/bento-design-system/templates/ [my-new-project] +``` + +Omitting the project name will clone the template in the current directory. + +## Available templates + +- [react-router-monorepo](./react-router-monorepo/README.md): sets up a monorepo using pnpm and Nx. The monorepo contains an app and a design system library. The app uses React Router v7 (with SSR enabled) and it comes with i18n pre-configured. + + ```bash + pnpx degit buildo/bento-design-system/templates/react-router-monorepo my-new-project + ``` diff --git a/templates/react-router-monorepo/.vscode/settings.json b/templates/react-router-monorepo/.vscode/settings.json index fae8e3d8a..ed990807f 100644 --- a/templates/react-router-monorepo/.vscode/settings.json +++ b/templates/react-router-monorepo/.vscode/settings.json @@ -1,4 +1,4 @@ { - "typescript.tsdk": "node_modules/typescript/lib", + "typescript.tsdk": "apps/app/node_modules/typescript/lib", "typescript.enablePromptUseWorkspaceTsdk": true } diff --git a/templates/react-router-monorepo/apps/app/package.json b/templates/react-router-monorepo/apps/app/package.json index 7248a3229..edf143817 100644 --- a/templates/react-router-monorepo/apps/app/package.json +++ b/templates/react-router-monorepo/apps/app/package.json @@ -35,9 +35,6 @@ "vite-plugin-checker": "^0.8.0", "vite-tsconfig-paths": "^5.0.1" }, - "resolutions": { - "react-router-dom": "7.0.0-pre.1" - }, "engines": { "node": ">=20.0.0" } diff --git a/templates/react-router-monorepo/libs/design-system/package.json b/templates/react-router-monorepo/libs/design-system/package.json index a276cec59..ecee9ab09 100644 --- a/templates/react-router-monorepo/libs/design-system/package.json +++ b/templates/react-router-monorepo/libs/design-system/package.json @@ -8,23 +8,21 @@ }, "scripts": { "build": "tsup --minify --clean", - "dev": "tsup --watch", - "generate:types": "" + "dev": "tsup --watch" }, "dependencies": { - "@buildo/bento-design-system": "^0.22.25", - "@phosphor-icons/react": "^2.1.7", - "@vanilla-extract/esbuild-plugin": "^2.3.11" + "@buildo/bento-design-system": "0.22.25", + "@phosphor-icons/react": "2.1.7", + "@vanilla-extract/esbuild-plugin": "2.3.11" }, "peerDependencies": { - "react": "^18.3.1", - "react-dom": "^18.3.1" + "react": "18.3.1", + "react-dom": "18.3.1" }, "devDependencies": { - "@microsoft/api-extractor": "^7.47.9", - "tsup": "^8.3.0", - "typescript": "^5.6.0", - "react": "^18.3.1", - "react-dom": "^18.3.1" + "tsup": "8.3.0", + "typescript": "5.6.3", + "react": "18.3.1", + "react-dom": "18.3.1" } }