šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

parcel-transformer-hbs

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parcel-transformer-hbs

transforms hbs files to template functions

1.0.4
latest
npm
Version published
Weekly downloads
715
24.78%
Maintainers
1
Weekly downloads
Ā 
Created
Source

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

  • Handlebars - A templates on steroids.
  • Parcel - Zero configuration bundler.

Keywords

parcel

FAQs

Package last updated on 18 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts