Skip to content

Commit d2dfd27

Browse files
build(next): add tsup config
wip build(next): Switch to 1.0 build(next): Add lint Co-Authored-By: David Dragovacz <[email protected]>
1 parent 038efcf commit d2dfd27

File tree

8 files changed

+911
-3
lines changed

8 files changed

+911
-3
lines changed

next/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/node_modules
2+
/dist

next/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@
1818
],
1919
"main": "index.js",
2020
"scripts": {
21-
"test": "echo \"Error: no test specified\" && exit 1"
21+
"lint": "tsc",
22+
"build": "tsup"
2223
},
2324
"devDependencies": {
2425
"@antfu/eslint-config": "^3.14.0",
25-
"eslint": "^9.18.0"
26+
"eslint": "^9.18.0",
27+
"tsup": "^8.3.5",
28+
"typescript": "^5.7.3"
2629
}
2730
}

next/pnpm-lock.yaml

Lines changed: 876 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

next/src/form.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export function createHeadlessForm(): never {
2+
throw new Error('Not implemented')
3+
}

next/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { createHeadlessForm } from './form'

next/tsconfig.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2020",
4+
"module": "ESNext",
5+
"strict": true,
6+
"esModuleInterop": true,
7+
"forceConsistentCasingInFileNames": true,
8+
"skipLibCheck": true
9+
},
10+
"include": ["src"],
11+
"exclude": ["node_modules", "dist"]
12+
}

next/tsup.config.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"clean": true,
3+
"dts": true,
4+
"entry": ["src/index.ts"],
5+
"format": ["esm"],
6+
"sourcemap": true,
7+
"minify": true,
8+
"target": "es2020",
9+
"outDir": "dist"
10+
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,6 @@
8080
],
8181
"engines": {
8282
"node": ">=18.14.0"
83-
}
83+
},
84+
"packageManager": "[email protected]+sha512.93e57b0126f0df74ce6bff29680394c0ba54ec47246b9cf321f0121d8d9bb03f750a705f24edc3c1180853afd7c2c3b94196d0a3d53d3e069d9e2793ef11f321"
8485
}

0 commit comments

Comments
 (0)