From 40b82897550faed896853f471f24742126f7aba2 Mon Sep 17 00:00:00 2001 From: mikuto Date: Thu, 13 Nov 2025 17:51:27 +0900 Subject: [PATCH] =?UTF-8?q?fix:cd=E3=81=8C=E9=80=9A=E3=82=89=E3=81=AA?= =?UTF-8?q?=E3=81=84=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- esbuild.js | 22 ++++++++++++++++------ src/appsscript.json | 6 ++++++ 2 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 src/appsscript.json diff --git a/esbuild.js b/esbuild.js index ffe388a..d7aada9 100644 --- a/esbuild.js +++ b/esbuild.js @@ -1,16 +1,26 @@ -import esbuild from "esbuild"; -import { GasPlugin } from "esbuild-gas-plugin"; +import esbuild from 'esbuild'; +import { GasPlugin } from 'esbuild-gas-plugin'; +import { copyFileSync, mkdirSync } from 'fs'; + +// distフォルダを作成(存在しない場合) +mkdirSync('./dist', { recursive: true }); + +// appsscript.jsonをコピー +copyFileSync('./src/appsscript.json', './dist/appsscript.json'); esbuild .build({ - entryPoints: ["./src/main.ts"], + entryPoints: ['./src/main.ts'], bundle: true, minify: true, - outfile: "./dist/main.js", + outfile: './dist/main.js', plugins: [GasPlugin], }) - .catch((error) => { - console.log('ビルドに失敗しました') + .then(() => { + console.log('✅ Build succeeded!'); + }) + .catch(error => { + console.log('❌ ビルドに失敗しました'); console.error(error); process.exit(1); }); diff --git a/src/appsscript.json b/src/appsscript.json new file mode 100644 index 0000000..7eb58df --- /dev/null +++ b/src/appsscript.json @@ -0,0 +1,6 @@ +{ + "timeZone": "Asia/Tokyo", + "dependencies": {}, + "exceptionLogging": "STACKDRIVER", + "runtimeVersion": "V8" +}