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 authored and stipsan committed Sep 29, 2023
1 parent 49f8965 commit 827de22
Show file tree
Hide file tree
Showing 15 changed files with 581 additions and 827 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": {
"module": "./dist/react-portable-text.esm.js",
"import": "./dist/react-portable-text.cjs.mjs"
"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 @@ -91,13 +92,6 @@
"dist/**/"
]
},
"tap": {
"check-coverage": false,
"node-arg": [
"-r",
"esbuild-register"
]
},
"dependencies": {
"@portabletext/toolkit": "^2.0.9",
"@portabletext/types": "^2.0.7"
Expand All @@ -112,7 +106,6 @@
"@types/react": "^18.2.23",
"@types/react-dom": "^18.2.8",
"@types/refractor": "^3.0.3",
"@types/tap": "^15.0.9",
"@types/ws": "^8.5.6",
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.3",
Expand All @@ -139,9 +132,9 @@
"rimraf": "^5.0.1",
"rollup-plugin-visualizer": "^5.9.2",
"styled-components": "^6.0.8",
"tap": "^16.3.9",
"typescript": "^5.2.2",
"vite": "^4.4.9"
"vite": "^4.4.9",
"vitest": "^0.34.2"
},
"peerDependencies": {
"react": "^17 || ^18"
Expand Down
Loading

0 comments on commit 827de22

Please sign in to comment.