you can load environment variables with dotenv by setting load property. these will be avaliable as variables.
"load": ["key1","key2"]
some functions can be disabled by setting property to false.
functions
property
variables
vars
if statments & loops
statments
comments
comments
html minifier
minify
Cli
options
option
function
h
help
g
generate uhc.config.json
c
load custion config file
w
watch path
Commands
Init
run uhc init to create a skeleton uhc app.
by default it creates a project named uhc-app, run uhc init <name> to pass
a name.
Dev
run uhc dev and see your site on localhost:8080,
uhc will also watch for file changes (using chokidar) in src directory and will
recompile and reload the browser (using live-server) on changes.
PORT can be passed as environment variable.
Component format
stylesheets added using link tag are not compiled.
load path for sass is the index file.
an example component
<style>// css or sass styles
main {
color:red;
}
</style><h1>title</h1><main><p>some text</p><importpath="some other component" />
</main>
Importing
import component using import tag.
<importpath="./component" />
Variables
variables can be used by ${} syntax.
${} can perform javascript.
<p>hello ${ foo + "something" }</p>
vars can be globally declared from uhc.config.json.
setting vars to false will disable vars.
"vars": {
"foo": "bar"
},
vars can be passed to component from import tag.
components inherit vars from thier parents.
<importpath="./component" foo="bar" />
Conditional Flow
(){} syntax become an if statment if input is a boolean.
(10 == n) {
<p>hello world</p>
}
else if / else are not supported yet. coming soon.