From 1b9c07400ad243ddad0c4d4295319b6cc265da8d Mon Sep 17 00:00:00 2001 From: tan Date: Thu, 30 Nov 2023 20:15:55 +0530 Subject: [PATCH 1/2] accept app root path as kwarg to `dash()` method Allow the app root path to be specified explicitly for the `dash()` method. The default is `app_root_path()` and does not break compatibilty. fixes: #232 --- src/app/dashapp.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/dashapp.jl b/src/app/dashapp.jl index 4e687a3..0f1687a 100644 --- a/src/app/dashapp.jl +++ b/src/app/dashapp.jl @@ -189,6 +189,7 @@ If a parameter can be set by an environment variable, that is listed as: Values provided here take precedence over environment variables. # Arguments +- `app_root::String` - a path, usually the current working directory, relative to which other folders are determined. Auto detected by default. - `assets_folder::String` - a path, relative to the current working directory, for extra files to be used in the browser. Default `'assets'`. All .js and .css files will be loaded immediately unless excluded by `assets_ignore`, and other files such as images will be served if requested. @@ -282,6 +283,7 @@ If a parameter can be set by an environment variable, that is listed as: clientside callback. """ function dash(; + app_root = app_root_path(), external_stylesheets = ExternalSrcType[], external_scripts = ExternalSrcType[], url_base_pathname = dash_env("url_base_pathname"), @@ -327,6 +329,6 @@ function dash(; compress, update_title ) - result = DashApp(app_root_path(), isinteractive(), config, index_string) + result = DashApp(app_root, isinteractive(), config, index_string) return result end From 5ee4f6c66e0d5cb40e0d2759960ac20a7213cb0d Mon Sep 17 00:00:00 2001 From: tan Date: Thu, 30 Nov 2023 20:21:25 +0530 Subject: [PATCH 2/2] add compat for stdlib packages --- Project.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Project.toml b/Project.toml index ad3c428..cc85428 100644 --- a/Project.toml +++ b/Project.toml @@ -35,6 +35,11 @@ JSON3 = "1.9" MD5 = "0.2" YAML = "0.4.7" julia = "1.6" +Base64 = "1.6" +Pkg = "1.6" +Sockets = "1.6" +Test = "1.6" +UUIDs = "1.6" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"