Skip to content

Commit

Permalink
feat: add esm entrypoint and build step for it
Browse files Browse the repository at this point in the history
  • Loading branch information
Souler committed Oct 12, 2024
1 parent 5063133 commit 8b07d08
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Thumbs.db
tmp/
temp/

dist/

# Node.js #
###################
Expand Down
15 changes: 14 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
"version": "0.0.2",
"description": "Middleware for common log format access logs",
"main": "index.js",
"exports": {
".": {
"require": "./index.js",
"import": "./dist/accesslog.mjs"
}
},
"scripts": {
"build": "gen-esm-wrapper . ./dist/accesslog.mjs",
"prepare": "npm run build",
"lint": "xo",
"test": "jest"
},
Expand All @@ -30,6 +38,7 @@
},
"devDependencies": {
"eslint-config-xo-lass": "^1.0.3",
"gen-esm-wrapper": "^1.1.3",
"jest": "^29.7.0",
"koa": "^2.12.1",
"supertest": "^4.0.2",
Expand All @@ -56,11 +65,15 @@
"prefer-rest-params": "off"
}
},
"files": [
"dist",
"index.js"
],
"engines": {
"node": ">= 18"
},
"homepage": "https://github.com/koajs/accesslog",
"bugs": {
"url": "https://github.com/koajs/accesslog/issues"
}
}
}

0 comments on commit 8b07d08

Please sign in to comment.