Skip to content

Commit

Permalink
build: remove cjs exports
Browse files Browse the repository at this point in the history
  • Loading branch information
gjbkz committed Aug 31, 2023
1 parent 946436e commit 336eeda
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 88 deletions.
53 changes: 1 addition & 52 deletions package-lock.json

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

17 changes: 4 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,9 @@
},
"homepage": "https://github.com/nlibjs/typing",
"repository": "https://github.com/nlibjs/typing",
"type": "commonjs",
"main": "./cjs/index.js",
"exports": {
"import": "./esm/index.mjs",
"require": "./cjs/index.js"
},
"type": "module",
"main": "./esm/index.mjs",
"files": [
"cjs",
"esm",
"!**/*.test.*"
],
Expand All @@ -29,17 +24,13 @@
"test:jest": "jest",
"lint": "eslint src",
"build": "run-s build:*",
"build:index": "npx @nlib/indexen --output src/index.ts \"./**/*.ts\"",
"build:esm": "run-s build:esm:*",
"build:esm:tsc": "tsc --project tsconfig.esm.json",
"build:esm:esmify": "npx @nlib/esmify \"./esm/**/*\"",
"build:cjs": "tsc --project tsconfig.cjs.json",
"build:index": "npx @nlib/indexen --output src/index.mts \"./**/*.mts\"",
"build:esm": "tsc",
"version": "npx @nlib/changelog --output CHANGELOG.md && git add CHANGELOG.md"
},
"devDependencies": {
"@nlib/changelog": "0.3.1",
"@nlib/eslint-config": "3.20.1",
"@nlib/esmify": "0.3.3",
"@nlib/githooks": "0.2.0",
"@nlib/indexen": "0.2.9",
"@nlib/lint-commit": "1.0.1",
Expand Down
9 changes: 0 additions & 9 deletions tsconfig.cjs.json

This file was deleted.

9 changes: 0 additions & 9 deletions tsconfig.esm.json

This file was deleted.

12 changes: 7 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"target": "es2020",
"module": "commonjs",
"moduleResolution": "node",
"target": "ESNext",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"strict": true,
"resolveJsonModule": true,
"removeComments": true,
Expand All @@ -11,6 +11,8 @@
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true
}
"noUnusedParameters": true,
"outDir": "esm"
},
"include": ["./src/**/*.mts"]
}

0 comments on commit 336eeda

Please sign in to comment.