File tree Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 1- import esbuild from "esbuild" ;
2- import { GasPlugin } from "esbuild-gas-plugin" ;
1+ import esbuild from 'esbuild' ;
2+ import { GasPlugin } from 'esbuild-gas-plugin' ;
3+ import { copyFileSync , mkdirSync } from 'fs' ;
4+
5+ // distフォルダを作成(存在しない場合)
6+ mkdirSync ( './dist' , { recursive : true } ) ;
7+
8+ // appsscript.jsonをコピー
9+ copyFileSync ( './src/appsscript.json' , './dist/appsscript.json' ) ;
310
411esbuild
512 . build ( {
6- entryPoints : [ " ./src/main.ts" ] ,
13+ entryPoints : [ ' ./src/main.ts' ] ,
714 bundle : true ,
815 minify : true ,
9- outfile : " ./dist/main.js" ,
16+ outfile : ' ./dist/main.js' ,
1017 plugins : [ GasPlugin ] ,
1118 } )
12- . catch ( ( error ) => {
13- console . log ( 'ビルドに失敗しました' )
19+ . then ( ( ) => {
20+ console . log ( '✅ Build succeeded!' ) ;
21+ } )
22+ . catch ( error => {
23+ console . log ( '❌ ビルドに失敗しました' ) ;
1424 console . error ( error ) ;
1525 process . exit ( 1 ) ;
1626 } ) ;
Original file line number Diff line number Diff line change 1+ {
2+ "timeZone" : " Asia/Tokyo" ,
3+ "dependencies" : {},
4+ "exceptionLogging" : " STACKDRIVER" ,
5+ "runtimeVersion" : " V8"
6+ }
You can’t perform that action at this time.
0 commit comments