File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -46,9 +46,31 @@ export async function compile(
4646 flags : string [ ] ,
4747 configuration : Configuration ,
4848) {
49- throw new Error ( "Not implemented" ) ;
50- }
49+ const denoBundleCmd : string [ ] = [ ] ;
50+ const denoExecPath = Deno . env . get ( "QUARTO_DENO" ) ;
51+ if ( ! denoExecPath ) {
52+ throw Error ( "QUARTO_DENO is not defined" ) ;
53+ }
54+ denoBundleCmd . push ( "compile" ) ;
55+ denoBundleCmd . push ( "--unstable-kv" ) ;
56+ denoBundleCmd . push ( "--unstable-ffi" ) ;
57+ denoBundleCmd . push (
58+ "--importmap=" + configuration . importmap ,
59+ ) ;
60+ denoBundleCmd . push ( "--output" ) ;
61+ denoBundleCmd . push ( output ) ;
62+ denoBundleCmd . push ( ...flags ) ;
5163
64+ denoBundleCmd . push ( input ) ;
65+
66+ const status = await execProcess ( {
67+ cmd : denoExecPath ,
68+ args : denoBundleCmd ,
69+ } ) ;
70+ if ( status . code !== 0 ) {
71+ throw Error ( `Failure to compile ${ input } ` ) ;
72+ }
73+ }
5274export async function install (
5375 input : string ,
5476 flags : string [ ] ,
You can’t perform that action at this time.
0 commit comments