Added custom logger package, switched to tsc in back building, added pnpm lifecycle scripts
This commit is contained in:
15
packages/logger/package.json
Normal file
15
packages/logger/package.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "@roomruler/logger",
|
||||
"main": "dist/src/index.js",
|
||||
"version": "0.0.0",
|
||||
"types": "dist/src/index.d.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"postinstall": "pnpm run build",
|
||||
"build": "tsc --build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^4.4.2"
|
||||
},
|
||||
"private": "true"
|
||||
}
|
2
packages/logger/src/index.ts
Normal file
2
packages/logger/src/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export const logger = (...args: unknown[]) =>
|
||||
console.log(new Date().toISOString() + ":", ...args);
|
10
packages/logger/tsconfig.json
Normal file
10
packages/logger/tsconfig.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"module": "es6",
|
||||
"target": "es6",
|
||||
"outDir": "dist",
|
||||
"composite": true
|
||||
},
|
||||
"include": ["src"],
|
||||
}
|
@@ -5,7 +5,8 @@
|
||||
"types": "dist/src/index.d.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "tsc --build"
|
||||
"build": "tsc --build",
|
||||
"postinstall": "pnpm run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^4.4.2"
|
||||
|
Reference in New Issue
Block a user