Package source holds all the assets for Statping. This includes CSS, JS, SCSS, HTML and other website related content. This package uses Rice to compile all assets into a single 'rice-box.go' file.
To compile all the HTML, JS, SCSS, CSS and image assets you'll need to have rice and sass installed on your local system.
sass source/scss/base.scss source/css/base.css cd source && rice embed-go
More info on: https://github.com/hunterlong/statping
Code generated by go generate; DO NOT EDIT. This file was generated by robots at 2019-11-22 13:12:12.290839 -0800 PST m=+0.637127810
This contains the most recently Markdown source for the Statping Wiki.
var ( CssBox *rice.Box // CSS files from the 'source/css' directory, this will be loaded into '/assets/css' ScssBox *rice.Box // SCSS files from the 'source/scss' directory, this will be loaded into '/assets/scss' JsBox *rice.Box // JS files from the 'source/js' directory, this will be loaded into '/assets/js' TmplBox *rice.Box // HTML and other small files from the 'source/tmpl' directory, this will be loaded into '/assets' FontBox *rice.Box // HTML and other small files from the 'source/tmpl' directory, this will be loaded into '/assets' )
CompiledWiki contains all of the Statping Wiki pages from the Github Wiki repo.
Assets will load the Rice boxes containing the CSS, SCSS, JS, and HTML files.
CompileSASS will attempt to compile the SASS files into CSS
CopyAllToPublic will copy all the files in a rice box into a local folder
CopyToPublic will create a file from a rice Box to the '/assets' directory
CreateAllAssets will dump HTML, CSS, SCSS, and JS assets into the '/assets' directory
DeleteAllAssets will delete the '/assets' folder
HelpMarkdown will return the Markdown of help.md into HTML
MakePublicFolder will create a new folder
OpenAsset returns a file's contents as a string
SaveAsset will save an asset to the '/assets/' folder.
data := byte("alert('helloooo')") SaveAsset(data, "js", "test.js")
UsingAssets returns true if the '/assets' folder is found in the directory