
Product
Introducing GitHub Actions Scanning Support
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.
inline ye compiled templates with browserify and the knights-templar module.
##usage
###api
// template.html
<p><strong>{{name}}</strong> - age {{age}}
// file1.js
var kt = require('knights-templar');
var template = kt.make(__dirname+'template.html', 'hbs');
var markup = template({ name: 'andy', age: 24 });
console.log(markup);
// build.js
var browserify = require('browserify');
var fs = require('fs');
var ktb = require('knights-templar-br');
var bundle = browserify('./file1.js')
.transform(ktb)
.bundle()
.pipe(fs.createWriteStream('./bundle.js'));
###cli
npm install -g ktbr
browserify -t ktbr test/file1.js > bundle.js
Keep in mind that for Handlebars, the bundle will only work if the Handlebars-runtime (or full Handlebars library) is included on the page. Both are available at the Handlebars website. So, using the above as an example, your html should look something like this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script src="handlebars-runtime.js"></script>
<script src="bundle.js"></script>
</body>
</html>
##license MIT
FAQs
inline ye compiled templates with browserify and the knights-templar module
We found that ktbr 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.
Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.
Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.
Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.