Add test-client build files

This commit is contained in:
Andras Schmelczer 2025-02-22 15:13:01 +00:00
parent 1be1764db6
commit 39561d386e
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
3 changed files with 71 additions and 0 deletions

View file

@ -0,0 +1,24 @@
{
"name": "test-client",
"version": "0.0.0",
"private": true,
"bin": {
"test-client": "./dist/cli.js"
},
"scripts": {
"dev": "webpack watch --mode development",
"build": "webpack --mode production"
},
"dependencies": {
"sync-client": "file:../sync-client"
},
"devDependencies": {
"uuid": "^11.1.0",
"chalk": "^5.4.1",
"ts-loader": "^9.5.2",
"tslib": "2.8.1",
"typescript": "5.7.3",
"webpack": "^5.98.0",
"webpack-cli": "^6.0.1"
}
}

View file

@ -0,0 +1,16 @@
{
"compilerOptions": {
"baseUrl": ".",
"strict": true,
"target": "ES2022",
"module": "CommonJS",
"esModuleInterop": true,
"lib": [
"DOM",
"ESNext"
]
},
"exclude": [
"./dist"
]
}

View file

@ -0,0 +1,31 @@
const path = require("path");
const webpack = require("webpack");
module.exports = {
entry: "./src/cli.ts",
target: "node",
mode: "production",
optimization: {
minimize: false
},
module: {
rules: [
{
test: /\.ts$/,
use: "ts-loader",
exclude: /node_modules/
}
]
},
resolve: {
extensions: [".ts", ".js"]
},
output: {
globalObject: "this",
filename: "cli.js",
path: path.resolve(__dirname, "dist")
},
plugins: [
new webpack.BannerPlugin({ banner: "#!/usr/bin/env node", raw: true })
]
};