Skip to content

Commit d30334a

Browse files
build with tsup and turbo
1 parent aaa69fc commit d30334a

23 files changed

+96
-82
lines changed

examples/cra/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@
33
"version": "6.16.0",
44
"private": true,
55
"scripts": {
6-
"dev": "GENERATE_SOURCEMAP=false react-scripts start",
76
"start": "GENERATE_SOURCEMAP=false react-scripts start",
87
"build": "GENERATE_SOURCEMAP=false react-scripts build",
9-
"eject": "GENERATE_SOURCEMAP=false react-scripts eject"
8+
"dev": "GENERATE_SOURCEMAP=false react-scripts start",
9+
"eject": "GENERATE_SOURCEMAP=false react-scripts eject",
10+
"lint": "eslint \"src/**/*.ts*\"",
11+
"clean": "rm -rf build"
1012
},
1113
"dependencies": {
1214
"@types/node": "^16.11.26",
1315
"@types/react": "^17.0.43",
1416
"@types/react-dom": "^17.0.14",
15-
"notion-types": "^6.15.6",
17+
"notion-types": "workspace:*",
1618
"react": "^17.0.2",
1719
"react-dom": "^17.0.2",
1820
"react-notion-x": "workspace:*",

examples/full/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
"private": true,
55
"type": "commonjs",
66
"scripts": {
7-
"dev": "next dev",
87
"build": "next build",
8+
"clean": "rm -rf .next",
9+
"dev": "next dev",
10+
"lint": "next lint",
911
"start": "next start",
1012
"analyze": "cross-env ANALYZE=true next build",
1113
"analyze:server": "cross-env BUNDLE_ANALYZE=server next build",
@@ -19,7 +21,7 @@
1921
"lqip-modern": "^1.2.0",
2022
"next": "^12.1.0",
2123
"notion-client": "workspace:*",
22-
"notion-compat": "^6.16.0",
24+
"notion-compat": "workspace:*",
2325
"notion-types": "workspace:*",
2426
"notion-utils": "workspace:*",
2527
"p-map": "^5.3.0",

examples/full/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"target": "es2016",
44
"lib": ["dom", "esnext"],
55
"allowJs": false,
6+
"composite": false,
67
"skipLibCheck": true,
78
"strict": false,
89
"forceConsistentCasingInFileNames": true,

examples/minimal/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
"private": true,
55
"type": "commonjs",
66
"scripts": {
7-
"dev": "next dev",
87
"build": "next build",
8+
"clean": "rm -rf .next",
9+
"dev": "next dev",
10+
"lint": "next lint",
911
"start": "next start",
1012
"deploy": "vercel deploy"
1113
},

examples/minimal/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"target": "es2016",
44
"lib": ["dom", "esnext"],
55
"allowJs": false,
6+
"composite": false,
67
"skipLibCheck": true,
78
"strict": false,
89
"forceConsistentCasingInFileNames": true,

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,16 @@
1515
],
1616
"scripts": {
1717
"build": "turbo run build",
18-
"build:tsc": "tsc --build",
19-
"watch": "run-p watch:* --continue-on-error",
20-
"watch:tsc": "tsc --build --watch --preserveWatchOutput",
21-
"dev": "turbo run dev",
22-
"clean": "del packages/*/build",
18+
"clean": "turbo run clean",
19+
"dev": "turbo run dev --no-cache --continue",
20+
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
21+
"lint": "turbo run lint",
2322
"pretest": "run-s build",
2423
"start": "turbo run start",
2524
"test": "run-p test:*",
2625
"test:unit": "turbo run test",
2726
"test:eslint": "eslint '**/*.{ts,tsx}'",
2827
"test:prettier": "prettier '**/*.{js,jsx,ts,tsx}' --check",
29-
"types": "turbo run types",
3028
"predeploy": "run-s build",
3129
"prepare": "husky install",
3230
"pre-commit": "lint-staged"

packages/notion-client/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
},
1919
"scripts": {
2020
"build": "tsup",
21-
"watch": "tsup --watch --silent --onSuccess 'echo build successful'",
21+
"clean": "rm -rf build",
22+
"dev": "tsup --watch",
23+
"lint": "eslint '**/*.{ts,tsx}'",
2224
"test": "ava"
2325
},
2426
"dependencies": {

packages/notion-client/tsconfig.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"extends": "../../tsconfig.base",
33
"compilerOptions": {
4-
"composite": true,
4+
"composite": false,
55
"rootDir": "src",
66
"outDir": "build",
77
"tsBuildInfoFile": "build/.tsbuildinfo",
88
"emitDeclarationOnly": true
99
},
10-
"include": ["src"],
11-
"references": [{ "path": "../notion-types" }, { "path": "../notion-utils" }]
10+
"include": [
11+
"src/**/*"
12+
],
1213
}

packages/notion-client/tsup.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { defineConfig } from 'tsup'
33
export default defineConfig({
44
entry: ['src/index.ts'],
55
outDir: 'build',
6+
dts: true,
67
target: 'node14',
78
platform: 'node',
89
format: ['esm'],

packages/notion-compat/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
},
1919
"scripts": {
2020
"build": "tsup",
21-
"watch": "tsup --watch --silent --onSuccess 'echo build successful'",
21+
"clean": "rm -rf build",
22+
"dev": "tsup --watch",
23+
"lint": "eslint '**/*.{ts,tsx}'",
2224
"test": "ava"
2325
},
2426
"dependencies": {

0 commit comments

Comments
 (0)