File tree Expand file tree Collapse file tree 6 files changed +19
-36
lines changed Expand file tree Collapse file tree 6 files changed +19
-36
lines changed Original file line number Diff line number Diff line change 11# --- Build Artifacts ---
2- src /reactpy /static /** / index.js *
2+ src /reactpy /static /*
33
44# --- Jupyter ---
55* .ipynb_checkpoints
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ commands = [
6969 ' bun run --cwd "src/js/packages/@reactpy/client" build' ,
7070 ' bun install --cwd "src/js/packages/@reactpy/app"' ,
7171 ' bun run --cwd "src/js/packages/@reactpy/app" build' ,
72- ' python "src/build_scripts/copy_dir.py" "src/js/packages/@reactpy/app/dist" "src/reactpy/static/assets "' ,
72+ ' python "src/build_scripts/copy_dir.py" "src/js/packages/@reactpy/app/dist" "src/reactpy/static"' ,
7373]
7474artifacts = []
7575
Original file line number Diff line number Diff line change 1111 "typescript" : " ^5.7.3"
1212 },
1313 "scripts" : {
14- "build" : " bun build \" src/index.ts \" --outdir \" dist\" --minify --sourcemap=linked" ,
14+ "build" : " bun build \" src/index.html \" --outdir= \" dist\" --minify --sourcemap=\" linked\" --experimental-html --public-path= \" reactpy/static/ \" " ,
1515 "checkTypes" : " tsc --noEmit"
1616 }
1717}
Original file line number Diff line number Diff line change 1+ <!doctype html>
2+ < html lang ="en ">
3+
4+ < head >
5+ < meta charset ="utf-8 " />
6+ < script type ="module " crossorigin src ="index.ts "> </ script >
7+ </ head >
8+
9+ < body >
10+ < div id ="app "> </ div >
11+ {mount_script}
12+ <!-- TODO: Replace `mount_script` with template tag -->
13+ </ body >
14+
15+ </ html >
Original file line number Diff line number Diff line change 1- import { mount , SimpleReactPyClient } from "@reactpy/client" ;
2-
3- function app ( element : HTMLElement ) {
4- const client = new SimpleReactPyClient ( {
5- serverLocation : {
6- url : document . location . origin ,
7- route : document . location . pathname ,
8- query : document . location . search ,
9- } ,
10- } ) ;
11- mount ( element , client ) ;
12- }
13-
14- const element = document . getElementById ( "app" ) ;
15- if ( element ) {
16- app ( element ) ;
17- } else {
18- console . error ( "Element with id 'app' not found" ) ;
19- }
1+ export { mount } from "@reactpy/client" ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments