You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ tree
.
├── compile.jl
├── Manifest.toml
├── MyApp
│ ├── Manifest.toml
│ ├── Project.toml
│ └── src
│ └── MyApp.jl
└── Project.toml
$ cat Project.toml
[deps]
PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d"
$ cat MyApp/Project.toml
name = "MyApp"
uuid = "5bdd58c3-ac14-40ac-9720-559844737c46"
authors = ["your name <[email protected]>"]
version = "0.1.0"
[deps]
Dash = "1b08a953-4be3-4667-9a23-3db579824955"
$ cat MyApp/src/MyApp.jl
module MyApp
using Dash
app = dash()
app.layout = html_div() do
html_button("CLICK", id = "btn"),
html_div(id = "out")
end
callback!(app,
Output("out", "children"),
Input("btn", "n_clicks")) do n_clicks
return "After click, you have: $n_clicks"
end
function julia_main()::Cint
try
run_server(app, "0.0.0.0", 8050)
catch
Base.invokelatest(Base.display_error, Base.catch_stack())
return 1
end
return 0
end
end # module
$ cat compile.jl
using PackageCompiler
create_app("MyApp", "MyAppCompiled")
then
$ julia --project compile.jl
PackageCompiler: bundled artifacts:
├── Dash
│ └── dash_resources - 25.242 MiB
├── Libiconv_jll - 1.955 MiB
└── PlotlyBase
└── plotly-base-artifacts - 2.746 MiB
Total artifact file size: 29.943 MiB
✔ [03m:43s] PackageCompiler: compiling base system image (incremental=false)
Precompiling project...
43 dependencies successfully precompiled in 480 seconds
✔ [06m:06s] PackageCompiler: compiling incremental system image
✔ ~/Documents/repos/dash-components/package-compiler-minimal
$ ./MyAppCompiled/bin/MyApp
┌ Warning: The `DashHtmlComponents` package is deprecated. All DashHtmlComponents functions have been moved to the Dash package. Please switch to `using Dash` instead.
└ @ DashHtmlComponents ~/.julia/packages/DashHtmlComponents/bHm4X/src/DashHtmlComponents.jl:3
┌ Warning: The `DashCoreComponents` package is deprecated. All DashCoreComponents functions have been moved to the Dash package. Please switch to `using Dash` instead.
└ @ DashCoreComponents ~/.julia/packages/DashCoreComponents/Dli7Q/src/DashCoreComponents.jl:3
┌ Warning: The `DashTable` package is deprecated. All DashTable functions have been moved to the Dash package. Please switch to `using Dash` instead.
└ @ DashTable ~/.julia/packages/DashTable/dFJHu/src/DashTable.jl:3
[ Info: Listening on: 0.0.0.0:8050
The text was updated successfully, but these errors were encountered:
Following up on #157
To reproduce, use:
then
The text was updated successfully, but these errors were encountered: