Skip to content

Commit

Permalink
Merge pull request #7 from jaredwray/adding-in-CJS-and-ESM-support-vi…
Browse files Browse the repository at this point in the history
…a-tsup

adding in CJS and ESM support via tsup
  • Loading branch information
jaredwray authored Sep 17, 2024
2 parents c53728c + 6c61f0a commit a45fdef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
## Features
- Emit Events via [Emittery](https://npmjs.com/package/emittery)
- Async Middleware Hooks for Your Methods
- ESM and Nodejs 20+
- ESM / CJS and Nodejs 20+
- Maintained on a regular basis!

Special thanks to [@sindresorhus](https://github.com/sindresorhus) for the [Emittery](https://npmjs.com/package/emittery) library. 🍻
Expand Down
21 changes: 14 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
{
"name": "hookified",
"version": "0.7.1",
"version": "1.0.0",
"description": "Event and Middleware Hooks",
"type": "module",
"main": "./dist/index.js",
"exports": "./dist/index.js",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"require": "./dist/index.cjs",
"import": "./dist/index.js"
}
},
"engines": {
"node": ">=20"
},
"scripts": {
"test": "xo --fix && vitest run --coverage",
"test:ci": "xo && vitest run --coverage",
"clean": "rimraf ./dist ./coverage ./site/dist",
"build": "rimraf ./dist && tsc",
"build": "rimraf ./dist && tsup src/index.ts --format cjs,esm --dts --clean",
"website:build": "docula build",
"website:serve": "docula serve",
"prepare": "npm run build"
Expand Down Expand Up @@ -55,11 +61,12 @@
"emittery": "^1.0.3"
},
"devDependencies": {
"@vitest/coverage-v8": "^2.0.5",
"@vitest/coverage-v8": "^2.1.1",
"docula": "^0.9.0",
"rimraf": "^6.0.1",
"typescript": "^5.5.4",
"vitest": "^2.0.5",
"tsup": "^8.3.0",
"typescript": "^5.6.2",
"vitest": "^2.1.1",
"xo": "^0.59.3"
},
"files": [
Expand Down

0 comments on commit a45fdef

Please sign in to comment.