1.1.2 • Published 3 years ago
brandjs v1.1.2
Simple code HTML Components Framework using NodeJS
const Brand = require("brandjs")
const brand = new Brand("./views/index.html") // initilaize brand
brand
.usePort(80) // using port
.dev() // development mode
.use(require("./src/topbar/topbar.brand")) // using component
.use(require("./src/component/component.brand")) // using component
.compile() // compile
.deploy() // deploy as HTTP server
Simple component
component.brand file: `
module.exports = {
name: 'Component', // Name of component
render(props, element) {
return \"\<div class=\"test\">${props.supername}\<\/div>\"
}
}
./views/index.html file example: ```
<body brand-app>
Mega website!
<Component data-supername="Super Name!" />
</body>