-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds hybrid JS exports for commonjs and mjs (#27)
- Loading branch information
1 parent
c7dce12
commit a3886f0
Showing
6 changed files
with
49 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#! /bin/bash | ||
|
||
# Adds package.json files to cjs/mjs subtrees | ||
|
||
cat >lib/cjs/package.json <<!EOF | ||
{ | ||
"type": "commonjs" | ||
} | ||
!EOF | ||
|
||
cat >lib/mjs/package.json <<!EOF | ||
{ | ||
"type": "module" | ||
} | ||
!EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,21 @@ | ||
{ | ||
"compilerOptions": { | ||
"outDir": "lib", | ||
"removeComments": true, | ||
"target": "ESNext", | ||
"declaration": true, | ||
|
||
// Module resolution | ||
"baseUrl": "runner", | ||
"esModuleInterop": true, | ||
"moduleResolution": "node", | ||
|
||
// Source Map | ||
"sourceMap": true, | ||
"sourceRoot": "./runner", | ||
|
||
// Strict Checks | ||
"alwaysStrict": true, | ||
"allowUnreachableCode": false, | ||
"noImplicitAny": true, | ||
"strictNullChecks": true, | ||
|
||
// Linter Checks | ||
"noImplicitReturns": true, | ||
"noUncheckedIndexedAccess": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true | ||
}, | ||
"include": ["runner/**/*.ts"], | ||
"exclude": [ | ||
"node_modules/**/*" | ||
] | ||
} | ||
"exclude": ["node_modules/**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "./tsconfig-base.json", | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"outDir": "lib/cjs", | ||
"target": "ES2015" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "./tsconfig-base.json", | ||
"compilerOptions": { | ||
"module": "esnext", | ||
"outDir": "lib/mjs", | ||
"target": "ESNext" | ||
} | ||
} |