0.1.0 • Published 4 years ago

component-decorator v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Component Decorator

Small package for rendering html using handlebars

Create a Component

  • Create a class
const Component = require("component-decorator");

// ES2022 Decorators
@Component(`<h1>{{name}}</h1>`)
class Foo {
    constructor(name) {
        // Write some code or leave this empty
    }
}

// Render
Foo.render("Bar"); // `<h1>Bar</h1>

Decorators

@Component(content: string); // Content will be compiled to Handlebars template
0.1.0

4 years ago

0.0.1

4 years ago

0.0.0

4 years ago

1.0.0

4 years ago