-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
891 additions
and
3,140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
.eslintrc.js | ||
dist/ | ||
tsup.config.ts | ||
vite.config.mts | ||
vitest-setup.ts | ||
website/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@swan-io/use-form", | ||
"version": "2.0.0-rc.2", | ||
"version": "2.0.0", | ||
"license": "MIT", | ||
"description": "A simple, fast and opinionated form library for React & React Native focusing on UX.", | ||
"author": "Mathieu Acthernoene <[email protected]>", | ||
|
@@ -33,20 +33,14 @@ | |
"registry": "https://registry.npmjs.org" | ||
}, | ||
"scripts": { | ||
"clean": "rm -rf dist", | ||
"format": "prettier '**/*' --ignore-unknown --write", | ||
"lint": "eslint --ext ts,tsx __tests__ src", | ||
"test": "vitest --run", | ||
"test:watch": "vitest --watch", | ||
"typecheck": "tsc --noEmit", | ||
"build": "yarn clean && microbundle -f cjs,es --tsconfig tsconfig.build.json", | ||
"build": "tsup", | ||
"prepack": "yarn typecheck && yarn lint && yarn test && yarn build" | ||
}, | ||
"browserslist": [ | ||
">0.2%", | ||
"not op_mini all", | ||
"not dead" | ||
], | ||
"prettier": { | ||
"printWidth": 100, | ||
"plugins": [ | ||
|
@@ -61,17 +55,18 @@ | |
}, | ||
"devDependencies": { | ||
"@testing-library/react": "^14.2.1", | ||
"@types/node": "^20.12.3", | ||
"@types/react": "^18.2.63", | ||
"@typescript-eslint/eslint-plugin": "^7.1.1", | ||
"@typescript-eslint/parser": "^7.1.1", | ||
"eslint": "^8.57.0", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"jsdom": "^24.0.0", | ||
"microbundle": "^0.15.1", | ||
"prettier": "^3.2.5", | ||
"prettier-plugin-organize-imports": "^3.2.4", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"tsup": "^8.0.2", | ||
"typescript": "^5.3.3", | ||
"vitest": "^1.3.1" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Options, defineConfig } from "tsup"; | ||
|
||
const commonOptions: Partial<Options> = { | ||
entry: { index: "src/index.ts" }, | ||
tsconfig: "./tsconfig.build.json", | ||
target: "es2019", | ||
sourcemap: true, | ||
treeshake: true, | ||
}; | ||
|
||
export default defineConfig([ | ||
{ | ||
...commonOptions, | ||
clean: true, | ||
format: "esm", | ||
}, | ||
{ | ||
...commonOptions, | ||
dts: true, | ||
format: "cjs", | ||
}, | ||
]); |
Oops, something went wrong.