Skip to content

Commit

Permalink
added cjs+esm setup
Browse files Browse the repository at this point in the history
  • Loading branch information
shirshendubhowmick committed Jul 7, 2024
1 parent 51abb38 commit 342131e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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

11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
{
"name": "@marcatopartners/timezone-enum",
"version": "0.0.3",
"version": "0.0.4",
"description": "Lightweight timezone enum for JavaScript or TypeScript.",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"main": "./dist/cjs/index.js",
"types": "./dist/esm/index.d.ts",
"module": "./dist/esm/index.js",
"files": [
"./dist"
],
"scripts": {
"build": "tsc"
"build": "npm run build:cjs && npm run build:esm",
"build:cjs": "tsc -p tsconfig.cjs.json",
"build:esm": "tsc -p tsconfig.json"
},
"keywords": [
"timezones"
Expand Down
8 changes: 8 additions & 0 deletions tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "CommonJS",
"outDir": "dist/cjs",
"declaration": true,
},
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"declaration": true,
"target": "es6",
"sourceMap": true,
"outDir": "dist",
"outDir": "dist/esm",
"moduleResolution": "node",
},
"exclude": [
Expand Down

0 comments on commit 342131e

Please sign in to comment.