Skip to content

Commit

Permalink
feat: use esm-first approach, use vitest for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed Aug 23, 2023
1 parent b70d6dd commit 6250386
Show file tree
Hide file tree
Showing 15 changed files with 435 additions and 771 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jspm_packages
.cache

# Compiled portable text library + demo
/dist
/lib
/demo/dist

*.iml
Expand Down
33 changes: 13 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,25 @@
"license": "MIT",
"author": "Sanity.io <[email protected]>",
"sideEffects": false,
"type": "module",
"exports": {
".": {
"types": "./dist/react-portable-text.d.ts",
"types": "./lib/index.d.ts",
"source": "./src/index.ts",
"require": "./dist/react-portable-text.js",
"require": "./lib/index.cjs",
"node": {
"import": "./dist/react-portable-text.cjs.mjs",
"require": "./dist/react-portable-text.js"
"module": "./lib/index.js",
"import": "./lib/index.cjs.js"
},
"import": "./dist/react-portable-text.esm.js",
"default": "./dist/react-portable-text.esm.js"
"import": "./lib/index.js",
"default": "./lib/index.js"
},
"./package.json": "./package.json"
},
"main": "./dist/react-portable-text.js",
"module": "./dist/react-portable-text.esm.js",
"main": "./lib/index.cjs",
"module": "./lib/index.js",
"source": "./src/index.ts",
"types": "./dist/react-portable-text.d.ts",
"types": "./lib/index.d.ts",
"files": [
"dist",
"!dist/stats.html",
Expand All @@ -51,7 +52,7 @@
"prepare": "husky install",
"prepublishOnly": "run-s build lint type-check",
"start": "vite demo",
"test": "tap test/*.test.*",
"test": "vitest",
"type-check": "tsc --noEmit"
},
"commitlint": {
Expand Down Expand Up @@ -106,13 +107,6 @@
],
"extends": "@sanity/semantic-release-preset"
},
"tap": {
"check-coverage": false,
"node-arg": [
"-r",
"esbuild-register"
]
},
"dependencies": {
"@portabletext/toolkit": "^2.0.4",
"@portabletext/types": "^2.0.5"
Expand All @@ -129,7 +123,6 @@
"@types/react-dom": "^18.2.7",
"@types/refractor": "^3.0.2",
"@types/styled-components": "^5.1.26",
"@types/tap": "^15.0.8",
"@types/ws": "^8.5.5",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
Expand Down Expand Up @@ -157,9 +150,9 @@
"rollup-plugin-visualizer": "^5.9.2",
"semantic-release": "^21.0.9",
"styled-components": "^5.3.11",
"tap": "^16.3.8",
"typescript": "^5.1.6",
"vite": "^4.4.9"
"vite": "^4.4.9",
"vitest": "^0.34.2"
},
"peerDependencies": {
"react": "^17 || ^18"
Expand Down
Loading

0 comments on commit 6250386

Please sign in to comment.