From 44d5741c5809199e71d0fccb8b2fa8d1e805e3b0 Mon Sep 17 00:00:00 2001 From: terwer Date: Sun, 16 Apr 2023 00:39:00 +0800 Subject: [PATCH] chore(zhi-cli): release zhi-log 1.3.0 --- apps/zhi-cli/esbuild.config.cjs | 24 ++------------------ apps/zhi-device-detection/esbuild.config.cjs | 1 - apps/zhi-env/esbuild.config.cjs | 1 - apps/zhi-log/esbuild.config.cjs | 1 - 4 files changed, 2 insertions(+), 25 deletions(-) diff --git a/apps/zhi-cli/esbuild.config.cjs b/apps/zhi-cli/esbuild.config.cjs index 0a335d48..0f63b8b1 100644 --- a/apps/zhi-cli/esbuild.config.cjs +++ b/apps/zhi-cli/esbuild.config.cjs @@ -23,39 +23,19 @@ * questions. */ -const path = require("path") const { dtsPlugin } = require("esbuild-plugin-d.ts") -const { copy } = require("esbuild-plugin-copy") - -const distDir = "./dist" /** * 构建配置 */ module.exports = { entryPoints: ["src/index.ts"], - outfile: path.join(distDir, "index.cjs"), + outfile: "dist/index.cjs", bundle: true, format: "cjs", platform: "node", banner: { js: "#!/usr/bin/env node", }, - plugins: [ - dtsPlugin(), - - copy({ - // this is equal to process.cwd(), which means we use cwd path as base path to resolve `to` path - // if not specified, this plugin uses ESBuild.build outdir/outfile options as base path. - resolveFrom: "cwd", - assets: [ - // copy one file - { - from: ["./README.md"], - to: [path.join(distDir, "/README.md")], - }, - ], - watch: true, - }), - ], + plugins: [dtsPlugin()], } diff --git a/apps/zhi-device-detection/esbuild.config.cjs b/apps/zhi-device-detection/esbuild.config.cjs index 855f11f1..8bb9a6d7 100644 --- a/apps/zhi-device-detection/esbuild.config.cjs +++ b/apps/zhi-device-detection/esbuild.config.cjs @@ -23,7 +23,6 @@ * questions. */ -const path = require("path") const { dtsPlugin } = require("esbuild-plugin-d.ts") /** diff --git a/apps/zhi-env/esbuild.config.cjs b/apps/zhi-env/esbuild.config.cjs index 855f11f1..8bb9a6d7 100644 --- a/apps/zhi-env/esbuild.config.cjs +++ b/apps/zhi-env/esbuild.config.cjs @@ -23,7 +23,6 @@ * questions. */ -const path = require("path") const { dtsPlugin } = require("esbuild-plugin-d.ts") /** diff --git a/apps/zhi-log/esbuild.config.cjs b/apps/zhi-log/esbuild.config.cjs index 855f11f1..8bb9a6d7 100644 --- a/apps/zhi-log/esbuild.config.cjs +++ b/apps/zhi-log/esbuild.config.cjs @@ -23,7 +23,6 @@ * questions. */ -const path = require("path") const { dtsPlugin } = require("esbuild-plugin-d.ts") /**