1.0.0 • Published 2 years ago

@novalua/component-builder-plugin v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

component-builder-plugin

Usage

  • Add the plugin to your snowpack configuration file:

snowpack.config.mjs

export default {
  plugins: ["@novalua/component-builder-plugin"],
}
  • Create a template for your html file inside the public folder

public/template.html

<!DOCTYPE html>
<html>
  <body>
    <main>{example}</main>
  </body>
</html>
  • Add your index html file:

public/index.html

<!DOCTYPE html>
<html>
  <body></body>
</html>
  • Create your components:

Every component should sit inside the src/components folder, with the same name as it's folder.

src/components/example/example.html

<div>I am an example component 😎</div>

Bug report

Found any bug? please open an issue