mirror of https://github.com/coder/code-server.git
Allow logger package to be publishable (#37)
This commit is contained in:
parent
68cb387fff
commit
90d3a0f16a
|
@ -0,0 +1,4 @@
|
||||||
|
src
|
||||||
|
tsconfig.build.json
|
||||||
|
webpack.config.js
|
||||||
|
yarn.lock
|
|
@ -1,6 +1,10 @@
|
||||||
# Logger
|
# Logger
|
||||||
|
|
||||||
Beautiful client logging inspired by https://github.com/uber-go/zap.
|
Beautiful logging inspired by https://github.com/uber-go/zap.
|
||||||
|
|
||||||
|
- Built for node and the browser
|
||||||
|
- Zero dependencies
|
||||||
|
- Uses groups in the browser to reduce clutter
|
||||||
|
|
||||||
## Example Usage
|
## Example Usage
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
{
|
{
|
||||||
"name": "@coder/logger",
|
"name": "@coder/logger",
|
||||||
"description": "Beautiful client logging inspired by https://github.com/uber-go/zap.",
|
"description": "Beautiful logging inspired by https://github.com/uber-go/zap.",
|
||||||
"main": "src/index.ts"
|
"scripts": {
|
||||||
|
"build": "tsc -p tsconfig.build.json && cp ./out/packages/logger/src/* ./out && rm -rf out/packages && ../../node_modules/.bin/webpack --config ./webpack.config.js",
|
||||||
|
"postinstall": "if [ ! -d out ];then npm run build; fi"
|
||||||
|
},
|
||||||
|
"version": "1.0.3",
|
||||||
|
"main": "out/main.js",
|
||||||
|
"types": "out/index.d.ts",
|
||||||
|
"author": "Coder",
|
||||||
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"extends": "../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"declarationDir": "out",
|
||||||
|
"declaration": true,
|
||||||
|
"emitDeclarationOnly": true
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
const path = require("path");
|
||||||
|
const merge = require("webpack-merge");
|
||||||
|
|
||||||
|
module.exports = merge(require(path.join(__dirname, "../../scripts", "webpack.general.config.js"))(), {
|
||||||
|
devtool: "none",
|
||||||
|
mode: "production",
|
||||||
|
target: "node",
|
||||||
|
output: {
|
||||||
|
path: path.join(__dirname, "out"),
|
||||||
|
filename: "main.js",
|
||||||
|
libraryTarget: "commonjs",
|
||||||
|
},
|
||||||
|
entry: [
|
||||||
|
"./packages/logger/src/index.ts"
|
||||||
|
],
|
||||||
|
});
|
Loading…
Reference in New Issue