-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
09c9700
commit e17504a
Showing
8 changed files
with
2,250 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v15.12.0 |
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,2 +1,3 @@ | ||
# esm-ts-experiment | ||
Package to experiment with ESM in NPM packages | ||
|
||
Package to experiment with ESM and TypeScript in NPM packages |
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,55 @@ | ||
{ | ||
"name": "@etienne-dldc/esm-ts-experiment", | ||
"version": "0.0.0", | ||
"description": "Package to experiment with ESM in NPM packages", | ||
"keywords": [], | ||
"homepage": "https://github.com/etienne-dldc/esm-ts-experiment#readme", | ||
"bugs": { | ||
"url": "https://github.com/etienne-dldc/esm-ts-experiment/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/etienne-dldc/esm-ts-experiment.git" | ||
}, | ||
"license": "MIT", | ||
"author": "Etienne Dldc", | ||
"type": "module", | ||
"exports": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "tsc", | ||
"pub": "npx np", | ||
"prepublish": "tsc", | ||
"test": "c8 --reporter=html --reporter=text ava", | ||
"test:watch": "ava --watch" | ||
}, | ||
"ava": { | ||
"extensions": { | ||
"ts": "module" | ||
}, | ||
"nodeArguments": [ | ||
"--loader=ts-node/esm" | ||
], | ||
"nonSemVerExperiments": { | ||
"configurableModuleFormat": true | ||
} | ||
}, | ||
"dependencies": { | ||
"tslib": "^2.2.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^3.15.0", | ||
"c8": "^7.7.2", | ||
"ts-node": "^10.0.0", | ||
"typescript": "^4.3.2" | ||
}, | ||
"engines": { | ||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
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,5 @@ | ||
import { createNum } from "./internal.js"; | ||
|
||
export function createNums() { | ||
return [createNum(), createNum()]; | ||
} |
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,7 @@ | ||
export function createNum(): number { | ||
return Math.random(); | ||
} | ||
|
||
export function createStr(): string { | ||
return Math.random().toString(32); | ||
} |
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,6 @@ | ||
import { createNums } from "../src/index.js"; | ||
import test from "ava"; | ||
|
||
test("createNums", (t) => { | ||
t.is(createNums().length, 2); | ||
}); |
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,23 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"module": "ES2020", | ||
"lib": ["esnext"], | ||
"importHelpers": true, | ||
"declaration": true, | ||
"sourceMap": true, | ||
"rootDir": "./src", | ||
"outDir": "dist", | ||
"strict": true, | ||
"strictPropertyInitialization": true, | ||
"noImplicitThis": true, | ||
"alwaysStrict": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noImplicitReturns": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"moduleResolution": "node", | ||
"esModuleInterop": true | ||
}, | ||
"include": ["src"] | ||
} |
Oops, something went wrong.