@@ -100,7 +100,11 @@ import {
100100 markdownFromJupyterPercentScript ,
101101} from "./percent.ts" ;
102102import { execProcess } from "../../core/process.ts" ;
103- import { inputFilesDir , isServerShinyPython } from "../../core/render.ts" ;
103+ import {
104+ inputFilesDir ,
105+ isServerShiny ,
106+ isServerShinyPython ,
107+ } from "../../core/render.ts" ;
104108import { jupyterCapabilities } from "../../core/jupyter/capabilities.ts" ;
105109
106110export const jupyterEngine : ExecutionEngine = {
@@ -512,19 +516,20 @@ export const jupyterEngine: ExecutionEngine = {
512516
513517 postRender : async ( files : RenderResultFile [ ] , _context ?: ProjectContext ) => {
514518 // discover non _files dir resources for server: shiny and ammend app.py with them
515- files . filter ( ( file ) => isServerShinyPython ( file . format ) ) . forEach ( ( file ) => {
516- const [ dir , stem ] = dirAndStem ( file . input ) ;
517- const filesDir = join ( dir , inputFilesDir ( file . input ) ) ;
518- const extraResources = file . resourceFiles
519- . filter ( ( resource ) => ! resource . startsWith ( filesDir ) )
520- . map ( ( resource ) => relative ( dir , resource ) ) ;
521- const appScript = join ( dir , `${ stem } -app.py` ) ;
522- if ( existsSync ( appScript ) ) {
523- // TODO: extraResoures is an array of relative paths to resources
524- // that are NOT in the _files dir. these should be injected into
525- // the appropriate place in appScript
526- }
527- } ) ;
519+ files . filter ( ( file ) => isServerShiny ( file . format ) )
520+ . forEach ( ( file ) => {
521+ const [ dir , stem ] = dirAndStem ( file . input ) ;
522+ const filesDir = join ( dir , inputFilesDir ( file . input ) ) ;
523+ const extraResources = file . resourceFiles
524+ . filter ( ( resource ) => ! resource . startsWith ( filesDir ) )
525+ . map ( ( resource ) => relative ( dir , resource ) ) ;
526+ const appScript = join ( dir , `${ stem } -app.py` ) ;
527+ if ( existsSync ( appScript ) ) {
528+ // TODO: extraResoures is an array of relative paths to resources
529+ // that are NOT in the _files dir. these should be injected into
530+ // the appropriate place in appScript
531+ }
532+ } ) ;
528533 } ,
529534
530535 postprocess : ( options : PostProcessOptions ) => {
0 commit comments