Skip to content

Commit

Permalink
Merge pull request #62 from kwonoj/feat-esm
Browse files Browse the repository at this point in the history
build(tsconfig): emit esm output
  • Loading branch information
terehov authored Nov 11, 2020
2 parents 02769f2 + a7c6a2f commit a97d463
Show file tree
Hide file tree
Showing 9 changed files with 1,048 additions and 977 deletions.
228 changes: 121 additions & 107 deletions README.md

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"name": "tslog",
"version": "2.11.1",
"description": "📝 Expressive TypeScript Logger for Node.js: Pretty errors, stack traces, code frames, and JSON output to attachable transports.",
"main": "dist/index",
"typings": "dist/index",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts",
"engines": {
"node": ">=10"
},
Expand All @@ -12,7 +13,7 @@
"ts-node-onchange": "onchange -i \"**/*.ts\" -- npm run ts-node",
"start-ts": "npm run ts-node",
"start": "node dist/example/index.js",
"build": "tsc",
"build": "tsc -b tsconfig.json tsconfig.esm.json tsconfig.types.json",
"prepublishOnly": "npm run build && npm run test",
"eslint": "eslint . --ext .ts",
"eslint-fix": "eslint . --ext .ts --fix",
Expand Down Expand Up @@ -80,8 +81,10 @@
"source-map-support": "^0.5.19"
},
"files": [
"dist"
"dist",
"src"
],
"sideEffects": false,
"keywords": [
"logger",
"typescript",
Expand Down
18 changes: 18 additions & 0 deletions src/Logger.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { wrapCallSite } from "source-map-support";
import { ISettings, ISettingsParam } from ".";
import { LoggerWithoutCallSite } from "./LoggerWithoutCallSite";

/**
* 📝 Expressive TypeScript Logger for Node.js
* @public
*/
export class Logger extends LoggerWithoutCallSite {
/**
* @param settings - Configuration of the logger instance (all settings are optional with sane defaults)
* @param parentSettings - Used internally to
*/
public constructor(settings?: ISettingsParam, parentSettings?: ISettings) {
super(settings, parentSettings);
this._callSiteWrapper = wrapCallSite;
}
}
Loading

0 comments on commit a97d463

Please sign in to comment.