Skip to content

blakerutledge/parcel-transformer-hbs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parcel-transformer-hbs

Transforms hbs files to template functions

Works with parcel 2

Install

npm install --save-dev parcel-transformer-hbs
yarn add -D parcel-transformer-hbs

In your .parcelrc add:

"transformers": {
  "*.hbs": ["parcel-transformer-hbs"]
}

Usage

Import your handlebars template:

// index.js
import templateFunction from './template.hbs';
document.body.innerHTML = templateFunction();

Import index.js from your index.html file:

<!DOCTYPE html>
<html>
  <body>
    <script src="./index.js"></script>
  </body>
</html>

Credits

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published