bootstrap_icons::resource_info (public)
bootstrap_icons::resource_info [ -version version ]
Defined in packages/bootstrap-icons/tcl/resource-procs.tcl
Get information about available version(s) of Bootstrap Icons, from the local filesystem, or from CDN.
- Switches:
- -version
(optional)- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: # # If no version is specified, use the namespaced variable. # if {$version eq ""} { set version $::bootstrap_icons::version } # # Setup variables for access via CDN vs. local resources. # set resourceDir [acs_package_root_dir bootstrap-icons/www/resources] set resourceUrl /resources/bootstrap-icons set cdnHost cdnjs.cloudflare.com set cdn //$cdnHost/ if {[file exists $resourceDir/bootstrap-icons-$version]} { # # Local version is installed # set prefix $resourceUrl/bootstrap-icons-$::bootstrap_icons::version set cdnHost "" set cspMap "" } else { # # Use CDN # # cloudflare has the following resources: # # https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.8.1/bootstrap-icons.svg # https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.8.1/font/bootstrap-icons.min.css # https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.8.1/icons/123.svg # # We just need the CSS file, which is on the CDN in the # "font" directory. set prefix $cdn/ajax/libs/bootstrap-icons/$version/font set cspMap [subst { urn:ad:css:bootstrap-icons { style-src $cdnHost font-src $cdnHost }}] # # # Other potential source: # # @import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css"); # <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css"> # #set cdnHost cdn.jsdelivr.net } # # Return the dict with at least the required fields # lappend result resourceName "Bootstrap Icons" resourceDir $resourceDir cdn $cdn cdnHost $cdnHost prefix $prefix cssFiles {} jsFiles {} extraFiles {} downloadURLs https://github.com/twbs/icons/releases/download/v${version}/bootstrap-icons-${version}.zip cspMap $cspMap urnMap {} versionCheckURL "https://cdnjs.com/libraries?q=bootstrap-icons" return $resultXQL Not present: Generic, PostgreSQL, Oracle