fa_icons::resource_info (public)
fa_icons::resource_info [ -version version ]
Defined in packages/fa-icons/tcl/resource-procs.tcl
Get information about available version(s) of Font Awesome 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 $::fa_icons::version } # # Setup variables for access via CDN vs. local resources. # set resourceDir [acs_package_root_dir fa-icons/www/resources] set resourceUrl /resources/fa-icons set cdnHost cdnjs.cloudflare.com set cdn //$cdnHost/ if {[file exists $resourceDir/fontawesome-free-$version-web/css]} { # # Local version is installed # set prefix $resourceUrl/fontawesome-free-$version-web/css set cdnHost "" set cspMap "" } else { # # Use CDN # # cloudflare has e.g. the following resources: # # https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css # # We just need the CSS file, which is on the CDN in the # "font" directory. set prefix $cdn/ajax/libs/font-awesome/$version/css set cspMap [subst { urn:ad:css:fa-icons { style-src $cdnHost font-src $cdnHost }}] } # # Return the dict with at least the required fields # lappend result resourceName "Font Awesome Icons" resourceDir $resourceDir cdn $cdn cdnHost $cdnHost prefix $prefix cssFiles {} jsFiles {} extraFiles {} downloadURLs https://github.com/FortAwesome/Font-Awesome/releases/download/${version}/fontawesome-free-${version}-web.zip cspMap $cspMap urnMap {} versionCheckURL https://cdnjs.com/libraries/font-awesome return $resultXQL Not present: Generic, PostgreSQL, Oracle