@@ -7,7 +7,7 @@ import { patchDenoLibJS } from "./client/plugos/plug_compile.ts";
77import { denoPlugins } from "@luca/esbuild-deno-loader" ;
88import * as esbuild from "esbuild" ;
99
10- // This builds the client and puts it into dist_client_bundle/
10+ // This builds the client and puts it into client_bundle/client
1111
1212export async function bundleAll ( ) : Promise < void > {
1313 await buildCopyBundleAssets ( ) ;
@@ -50,8 +50,8 @@ export async function copyAssets(dist: string) {
5050}
5151
5252async function buildCopyBundleAssets ( ) {
53- await Deno . mkdir ( "dist_client_bundle " , { recursive : true } ) ;
54- await Deno . mkdir ( "dist_base_fs_bundle " , { recursive : true } ) ;
53+ await Deno . mkdir ( "client_bundle/client " , { recursive : true } ) ;
54+ await Deno . mkdir ( "client_bundle/base_fs " , { recursive : true } ) ;
5555
5656 console . log ( "Now ESBuilding the client and service workers..." ) ;
5757
@@ -66,7 +66,7 @@ async function buildCopyBundleAssets() {
6666 out : "service_worker" ,
6767 } ,
6868 ] ,
69- outdir : "dist_client_bundle " ,
69+ outdir : "client_bundle/client " ,
7070 absWorkingDir : Deno . cwd ( ) ,
7171 bundle : true ,
7272 treeShaking : true ,
@@ -89,11 +89,13 @@ async function buildCopyBundleAssets() {
8989 }
9090
9191 // Patch the service_worker {{CACHE_NAME}}
92- let swCode = await Deno . readTextFile ( "dist_client_bundle/service_worker.js" ) ;
92+ let swCode = await Deno . readTextFile (
93+ "client_bundle/client/service_worker.js" ,
94+ ) ;
9395 swCode = swCode . replaceAll ( "{{CACHE_NAME}}" , `cache-${ Date . now ( ) } ` ) ;
94- await Deno . writeTextFile ( "dist_client_bundle /service_worker.js" , swCode ) ;
96+ await Deno . writeTextFile ( "client_bundle/client /service_worker.js" , swCode ) ;
9597
96- await copyAssets ( "dist_client_bundle /.client" ) ;
98+ await copyAssets ( "client_bundle/client /.client" ) ;
9799
98100 console . log ( "Built!" ) ;
99101}
0 commit comments