Skip to content

vinisaveg/component-builder-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

component-builder-plugin

A component builder plugin for snowpack.

Installing


  yarn add -D @novalua/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

Releases

No releases published

Packages

No packages published