Skip to content

Commit

Permalink
Move to tsup and output both ESM and CJS
Browse files Browse the repository at this point in the history
  • Loading branch information
martpie committed Apr 28, 2024
1 parent 6663953 commit 685ab6e
Show file tree
Hide file tree
Showing 2 changed files with 1,209 additions and 57 deletions.
26 changes: 22 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,31 @@
"name": "react-slugify",
"version": "3.0.3",
"description": "Slugify a React node",
"main": "dist/slugify.js",
"type": "module",
"main": "./dist/slugify.js",
"module": "./dist/slugify.js",
"types": "./dist/slugify.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/slugify.d.ts",
"default": "./dist/slugify.js"
},
"require": {
"types": "./dist/slugify.d.cts",
"default": "./dist/slugify.cjs"
}
}
},
"files": [
"src",
"dist",
"!**/__tests__"
],
"scripts": {
"preversion": "npm run test",
"prepublishOnly": "npm run build",
"build": "tsc",
"preversion": "yarn test",
"prepublishOnly": "yarn publint && yarn build",
"build": "tsup src/slugify.ts --format cjs,esm --dts --sourcemap --clean",
"test": "vitest run",
"test:watch": "vitest watch"
},
Expand All @@ -31,9 +46,12 @@
},
"homepage": "https://github.com/martpie/react-slugify#readme",
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.3",
"@types/diacritics": "^1.3.3",
"@types/react": "^18.3.1",
"publint": "^0.2.7",
"react": "^18.3.1",
"tsup": "^8.0.2",
"typescript": "^5.4.5",
"vitest": "^1.5.2"
},
Expand Down
Loading

0 comments on commit 685ab6e

Please sign in to comment.