npm.io
1.1.2 • Published 5 years ago

brandjs

Licence
ISC
Version
1.1.2
Deps
2
Size
3 kB
Vulns
0
Weekly
0

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>