Genie.Assets.add_fileroute — Functionaddfileroute(assetsconfig::Genie.Assets.AssetsConfig, filename::AbstractString; basedir = pwd(), type::Union{Nothing, String} = nothing, content_type::Union{Nothing, Symbol} = nothing, ext::Union{Nothing, String} = nothing, kwargs...)
Helper function to add a file route to the assets based on asset_config and filename.
Example
add_fileroute(StippleUI.assets_config, "Sortable.min.js")
add_fileroute(StippleUI.assets_config, "vuedraggable.umd.min.js")
add_fileroute(StippleUI.assets_config, "vuedraggable.umd.min.js.map", type = "js")
add_fileroute(StippleUI.assets_config, "QSortableTree.js")
draggabletree_deps() = [
script(src = "/stippleui.jl/master/assets/js/sortable.min.js")
script(src = "/stippleui.jl/master/assets/js/vuedraggable.umd.min.js")
script(src = "/stippleui.jl/master/assets/js/qsortabletree.js")
]
Stipple.DEPS[:qdraggabletree] = draggabletree_depsGenie.Assets.AssetsConfig — Typemutable struct AssetsConfigManages the assets configuration for the current package. Define your own instance of AssetsConfig if you want to add support for asset management for your package through Genie.Assets.
Genie.Assets.assets_config! — Functionassets_config!(packages::Vector{Module}; config...) :: Nothing
assets_config!(package::Module; config...) :: NothingUtility function which allows bulk configuration of the assets.
Example
Genie.Assets.assets_config!([Genie, Stipple, StippleUI], host = "https://cdn.statically.io/gh/GenieFramework")assets_config!(; config...) :: NothingUpdates the assets configuration for the current package.
Genie.Assets.asset_file — Functionasset_file(; cwd = "", file::String, path::String = "", type::String = "", prefix::String = "assets",
ext::String = "", min::Bool = false, skip_ext::Bool = false) :: StringGenerates the file system path to an asset file.
Genie.Assets.asset_path — Functionasset_path(; file::String, host::String = Genie.config.base_path, package::String = "", version::String = "",
prefix::String = "assets", type::String = "", path::String = "", min::Bool = false,
ext::String = "", skip_ext::Bool = false, query::String = "") :: String
asset_path(file::String; kwargs...) :: String
asset_path(ac::AssetsConfig, tp::Union{Symbol,String}; type::String = string(tp), path::String = "",
file::String = "", ext::String = "", skip_ext::Bool = false, query::String = "") :: StringGenerates the path to an asset file.
Genie.Assets.asset_route — Functionasset_route(; file::String, package::String = "", version::String = "", prefix::String = "assets",
type::String = "", path::String = "", min::Bool = false,
ext::String = "", skip_ext::Bool = false, query::String = "") :: String
asset_route(file::String; kwargs...) :: String
asset_route(ac::AssetsConfig, tp::Union{Symbol,String}; type::String = string(tp), path::String = "",
file::String = "", ext::String = "", skip_ext::Bool = false, query::String = "") :: StringGenerates the route to an asset file.
Genie.Assets.channels — Functionchannels(channel::AbstractString = Genie.config.webchannels_default_route) :: StringOutputs the channels.js file included with the Genie package.
Genie.Assets.channels_script — Functionchannels_script(channel::AbstractString = Genie.config.webchannels_default_route) :: StringOutputs the channels JavaScript content within <script>...</script> tags, for embedding into the page.
Missing docstring for channels_script_tag. Check Documenter's build log for details.
Genie.Assets.channels_subscribe — Functionchannels_subscribe(channel::AbstractString = Genie.config.webchannels_default_route) :: NothingRegisters subscription and unsubscription channels for channel.
Genie.Assets.channels_support — Functionchannels_support(channel = Genie.config.webchannels_default_route) :: StringProvides full web channels support, setting up routes for loading support JS files, web sockets subscription and returning the <script> tag for including the linked JS file into the web page.
Genie.Assets.css_asset — Functioncss_asset(file_name::String) :: StringPath to a css asset. The file_name should not include the extension.
Genie.Assets.embedded — Functionembeded(path::String) :: StringReads and outputs the file at path.
Genie.Assets.embedded_path — Functionembeded_path(path::String) :: StringReturns the path relative to Genie's root package dir.
Genie.Assets.external_assets — Functionexternal_assets(host::String) :: Bool
external_assets(ac::AssetsConfig) :: Bool
external_assets() :: BoolReturns true if the current package is using external assets.
Genie.Assets.favicon_support — Functionfavicon_support() :: StringOutputs the <link> tag for referencing the favicon file embedded with Genie.
Genie.Assets.include_asset — Functioninclude_asset(asset_type::Union{String,Symbol}, file_name::Union{String,Symbol}) :: StringReturns the path to an asset. asset_type can be one of :js, :css. The file_name should not include the extension.
Genie.Assets.js_asset — Functionjs_asset(file_name::String) :: StringPath to a js asset. file_name should not include the extension.
Genie.Assets.js_settings — Functionjs_settings(channel::String = Genie.config.webchannels_default_route) :: StringSets up a window.Genie.Settings JavaScript object which exposes relevant Genie app settings from Genie.config
Genie.Assets.webthreads — Functionwebthreads() :: StringOutputs the webthreads.js file included with the Genie package
Missing docstring for webthreads_endpoint. Check Documenter's build log for details.
Genie.Assets.webthreads_push_pull — Functionfunction webthreads_push_pull(channel) :: NothingRegisters push and pull routes for channel.
Genie.Assets.webthreads_script — Functionwebthreads_script() :: StringOutputs the channels JavaScript content within <script>...</script> tags, for embedding into the page.
Missing docstring for webthreads_script_tag. Check Documenter's build log for details.
Genie.Assets.webthreads_subscribe — Functionfunction webthreads_subscribe(channel) :: NothingRegisters subscription and unsubscription routes for channel.
Genie.Assets.webthreads_support — Functionwebthreads_support(channel = Genie.config.webthreads_default_route) :: StringProvides full web channels support, setting up routes for loading support JS files, web sockets subscription and returning the <script> tag for including the linked JS file into the web page.