Support ESModules
This commit is contained in:
parent
7a649fa1b0
commit
5203871aa8
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
node_modules/
|
||||
lib/
|
||||
es/
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hibas123/utils",
|
||||
"version": "2.2.3",
|
||||
"version": "2.2.4",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,12 +1,13 @@
|
||||
{
|
||||
"name": "@hibas123/utils",
|
||||
"version": "2.2.6",
|
||||
"version": "2.2.7",
|
||||
"description": "Different Utilities, that are not worth own packages",
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
"module": "es/index.js",
|
||||
"scripts": {
|
||||
"prepublishOnly": "tsc",
|
||||
"build": "tsc",
|
||||
"prepublishOnly": "npm run build",
|
||||
"build": "tsc && tsc -p tsconfig.esm.json",
|
||||
"watch-ts": "tsc -w"
|
||||
},
|
||||
"author": "Fabian Stamm <dev@fabianstamm.de>",
|
||||
|
@ -1,4 +1,4 @@
|
||||
import Observable, { ObserverCallback } from "./observable";
|
||||
import Observable, { ObserverCallback } from "./observable.js";
|
||||
|
||||
export type CheckFunction<T> = (val: T) => boolean;
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import Lock, { Release } from "./lock";
|
||||
import Lock, { Release } from "./lock.js";
|
||||
import Observable, {
|
||||
ObserverCallback,
|
||||
ObserverCallbackCollect,
|
||||
ObservableInterface,
|
||||
} from "./observable";
|
||||
import AwaitStore from "./awaiter";
|
||||
} from "./observable.js";
|
||||
import AwaitStore from "./awaiter.js";
|
||||
|
||||
export {
|
||||
Lock,
|
||||
|
8
tsconfig.esm.json
Normal file
8
tsconfig.esm.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "classic",
|
||||
"outDir": "es"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user