Add ESModule support
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { Observable, ObservableInterface } from "@hibas123/utils";
|
||||
import { ConsoleAdapter } from "./consolewriter";
|
||||
import inspect from "./inspect";
|
||||
import { ConsoleAdapter } from "./consolewriter.js";
|
||||
import inspect from "./inspect.js";
|
||||
import {
|
||||
Adapter,
|
||||
LoggingTypes,
|
||||
@ -12,7 +12,7 @@ import {
|
||||
Colors,
|
||||
FormattedText,
|
||||
FormattedLine,
|
||||
} from "./types";
|
||||
} from "./types.js";
|
||||
|
||||
const browser = typeof window !== "undefined";
|
||||
|
||||
|
@ -1,14 +1,16 @@
|
||||
import { ObservableInterface } from "@hibas123/utils";
|
||||
import { Colors } from "./index";
|
||||
import { Colors } from "./index.js";
|
||||
import {
|
||||
Adapter,
|
||||
Message,
|
||||
FormattedLine,
|
||||
TerminalFormats,
|
||||
FormatTypes,
|
||||
} from "./types";
|
||||
} from "./types.js";
|
||||
|
||||
const browser = typeof window !== "undefined";
|
||||
declare const Deno: any;
|
||||
|
||||
const browser = typeof window !== "undefined" && typeof Deno === "undefined";
|
||||
|
||||
export class ConsoleAdapter implements Adapter {
|
||||
constructor(private colors: boolean = true) {}
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { LoggingBase } from "./base";
|
||||
export { ConsoleAdapter } from "./consolewriter";
|
||||
import { LoggingBase } from "./base.js";
|
||||
export { ConsoleAdapter } from "./consolewriter.js";
|
||||
export {
|
||||
LoggingBase,
|
||||
LoggingBaseOptions,
|
||||
removeColors,
|
||||
withColor,
|
||||
} from "./base";
|
||||
} from "./base.js";
|
||||
export {
|
||||
Adapter,
|
||||
LoggingTypes,
|
||||
@ -18,7 +18,7 @@ export {
|
||||
Format,
|
||||
FormatTypes,
|
||||
TerminalFormats,
|
||||
} from "./types";
|
||||
} from "./types.js";
|
||||
|
||||
export { ObservableInterface } from "@hibas123/utils";
|
||||
|
||||
|
@ -1,4 +1,10 @@
|
||||
import { Logging, LoggingBase, LoggingTypes, Colors, withColor } from ".";
|
||||
import {
|
||||
Logging,
|
||||
LoggingBase,
|
||||
LoggingTypes,
|
||||
Colors,
|
||||
withColor,
|
||||
} from "./index.js";
|
||||
|
||||
Logging.log("test");
|
||||
Logging.log("i", "am", { a: "an" }, 1000);
|
||||
|
Reference in New Issue
Block a user