Skip to content

Commit

Permalink
Update with-changesets with App Router. (#4843)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshew committed May 16, 2023
1 parent 407ad8f commit 3b22f1c
Show file tree
Hide file tree
Showing 11 changed files with 338 additions and 129 deletions.
2 changes: 1 addition & 1 deletion examples/with-changesets/apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@acme/core": "workspace:*",
"@acme/utils": "workspace:*",
"next": "latest",
"next": "^13.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
11 changes: 11 additions & 0 deletions examples/with-changesets/apps/docs/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}
10 changes: 10 additions & 0 deletions examples/with-changesets/apps/docs/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Button } from "@acme/core";

export default function Page() {
return (
<>
<h1>Web</h1>
<Button>Boop</Button>
</>
);
}
14 changes: 0 additions & 14 deletions examples/with-changesets/apps/docs/src/pages/index.tsx

This file was deleted.

10 changes: 7 additions & 3 deletions examples/with-changesets/apps/docs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
"exclude": ["node_modules"],
"extends": "@acme/tsconfig/nextjs.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"incremental": true
"incremental": true,
"plugins": [
{
"name": "next"
}
]
},
"include": ["src", "next-env.d.ts"]
"include": ["src", "next-env.d.ts", ".next/types/**/*.ts"]
}
12 changes: 6 additions & 6 deletions examples/with-changesets/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"private": true,
"scripts": {
"build": "turbo run build",
"dev": "turbo run dev --no-cache --continue",
"lint": "turbo run lint",
"clean": "turbo run clean && rm -rf node_modules",
"build": "turbo build",
"dev": "turbo dev --no-cache --continue",
"lint": "turbo lint",
"clean": "turbo clean && rm -rf node_modules",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"changeset": "changeset",
"version-packages": "changeset version",
"release": "turbo run build --filter=docs^... && changeset publish"
"release": "turbo build --filter=docs^... && changeset publish"
},
"devDependencies": {
"@changesets/cli": "^2.22.0",
"eslint": "^7.32.0",
"eslint-config-acme": "workspace:*",
"prettier": "^2.5.1",
"turbo": "latest"
"turbo": "^1.9.3"
},
"packageManager": "pnpm@7.15.0"
}
13 changes: 13 additions & 0 deletions examples/with-changesets/packages/acme-core/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineConfig } from "tsup";

export default defineConfig({
entry: {
".": "src/index.tsx",
},
banner: {
js: "'use client'",
},
format: ["cjs", "esm"],
external: ["react"],
dts: true,
});
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"module": "esnext",
"noEmit": true,
"resolveJsonModule": true,
"rootDir": "src",
"target": "es5"
},
"include": ["src", "next-env.d.ts"],
Expand Down
2 changes: 1 addition & 1 deletion examples/with-changesets/packages/acme-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@types/react-dom": "^18.2.0",
"eslint": "^7.32.0",
"eslint-config-acme": "workspace:*",
"react": "^17.0.2",
"react": "^18.2.0",
"tsup": "^5.10.1",
"typescript": "^4.5.3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"eslint-config-next": "latest",
"eslint-config-next": "^13.4.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-react": "7.28.0",
"eslint-config-turbo": "latest"
"eslint-config-turbo": "^1.9.3"
},
"publishConfig": {
"access": "public"
Expand Down
Loading

0 comments on commit 3b22f1c

Please sign in to comment.