Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
handlebar-rider
Advanced tools
Compiles/watches a directory of handlebar templates files and precompiles into single js output file
================
This is a module and command line tool that will compile/watch a handlebars template directory and pre-compile any handlebars template files then concatenate them into a single javascript file.
The directory structure you use will namespace the templates with ['directory/template'] as with JST et all
UPDATE 9.20.2012 - I have merged this library with Flint (http://github.com/cif/flint) however, changes contributed by others are welcome and always merged.
npm install -g handlebar-rider
Command Line Usage:
Options:
-i, --in Specify an input templates directory [default: "./app/handlebars/"]
-o, --out Specify an output file into which templates are compiled [default: "./public/javascript/templates.js"]
-w, --watch Watch your handlebars files and compile when changes occur [default: false]
-r, --readable Make the output more readable by avoiding default minification [default: false]
hbr = require('handlebar-rider')
hbr.configure({
in: '/path/to/your/templates/'
out: '/path/to/output.js',
minify: false
})
hbr.compile()
hbr.watch()
html_output = Handlebars.templates['users/view'](data)
There are two methods for using partials within your templates:
If you create a directory within your templates directory aptly called "partials", the handlebars files will be pre compile and become available in your templates as partial_name
If you prefix your template file name with an underscore, you can can access it as directory_partial
templates
-- users
- _list.hb
- _form.hb
- edit.hb
- view.hb
-- partials
- photo_uploader.hb
<h1>Edit User</h1>
{{> users_list}}
{{> users_form}}
{{> photo_uploader}}
FAQs
Compiles/watches a directory of handlebar templates files and precompiles into single js output file
We found that handlebar-rider demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.