From 39561d386eff7f79309bde39fed06f33fac9ab78 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Sat, 22 Feb 2025 15:13:01 +0000 Subject: [PATCH] Add test-client build files --- frontend/test-client/package.json | 24 ++++++++++++++++++++ frontend/test-client/tsconfig.json | 16 +++++++++++++ frontend/test-client/webpack.config.js | 31 ++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 frontend/test-client/package.json create mode 100644 frontend/test-client/tsconfig.json create mode 100644 frontend/test-client/webpack.config.js diff --git a/frontend/test-client/package.json b/frontend/test-client/package.json new file mode 100644 index 00000000..262ff149 --- /dev/null +++ b/frontend/test-client/package.json @@ -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" + } +} \ No newline at end of file diff --git a/frontend/test-client/tsconfig.json b/frontend/test-client/tsconfig.json new file mode 100644 index 00000000..e8142716 --- /dev/null +++ b/frontend/test-client/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "strict": true, + "target": "ES2022", + "module": "CommonJS", + "esModuleInterop": true, + "lib": [ + "DOM", + "ESNext" + ] + }, + "exclude": [ + "./dist" + ] +} \ No newline at end of file diff --git a/frontend/test-client/webpack.config.js b/frontend/test-client/webpack.config.js new file mode 100644 index 00000000..aa42a7df --- /dev/null +++ b/frontend/test-client/webpack.config.js @@ -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 }) + ] +};