Skip to content

Commit

Permalink
Attempt to populate package.jsons in a more portable way
Browse files Browse the repository at this point in the history
  • Loading branch information
parnic committed Jan 5, 2025
1 parent 516b393 commit 3149e42
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions cjs-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "commonjs"}
2 changes: 1 addition & 1 deletion cjs/package.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"type": "commonjs"}
{"type": "commonjs"}
1 change: 1 addition & 0 deletions esm-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "module"}
2 changes: 1 addition & 1 deletion esm/package.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"type": "module"}
{"type": "module"}
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc --module commonjs --moduleResolution classic --outDir cjs/ && echo {\"type\": \"commonjs\"} > cjs/package.json && tsc --outDir esm/ && echo {\"type\": \"module\"} > esm/package.json",
"build": "tsc --module commonjs --moduleResolution classic --outDir cjs/ && ncp cjs-package.json cjs/package.json && tsc --outDir esm/ && ncp esm-package.json esm/package.json",
"example": "tsc && node esm/example.js",
"lint": "eslint . && prettier . --check && markdownlint-cli2 **/*.md",
"lint:fix": "eslint . --fix && prettier . --write && markdownlint-cli2 --fix **/*.md",
Expand All @@ -93,6 +93,7 @@
"eslint": "^9.17.0",
"markdownlint-cli2": "^0.17.1",
"minimist": "^1.2.8",
"ncp": "^2.0.0",
"prettier": "3.4.2",
"supports-color": "^10.0.0",
"typescript": "^5.7.2",
Expand Down

0 comments on commit 3149e42

Please sign in to comment.