vweb.assets #

fn minify_css #

fn minify_css(css string) string

todo: implement proper minification

fn minify_js #

fn minify_js(js string) string

todo: implement proper minification

fn new_manager #

fn new_manager() &AssetManager

new_manager returns a new AssetManager

fn (AssetManager) add_css #

fn (mut am AssetManager) add_css(file string) bool

add_css adds a css asset

fn (AssetManager) add_js #

fn (mut am AssetManager) add_js(file string) bool

add_js adds a js asset

fn (AssetManager) combine_css #

fn (am AssetManager) combine_css(to_file bool) string

combine_css returns the combined css as a string when to_file is false when to_file is true it combines the css to disk and returns the path of the file

fn (AssetManager) combine_js #

fn (am AssetManager) combine_js(to_file bool) string

combine_js returns the combined js as a string when to_file is false when to_file is true it combines the css to disk and returns the path of the file

fn (AssetManager) include_css #

fn (am AssetManager) include_css(combine bool) string

include_css returns the html <link> tag(s) for including the css files in a page.
when combine is true the files are combined.

fn (AssetManager) include_js #

fn (am AssetManager) include_js(combine bool) string

include_js returns the html <script> tag(s) for including the js files in a page.
when combine is true the files are combined.