Gathering detailed insights and metrics for babel-plugin-htmlbars-inline-precompile
Gathering detailed insights and metrics for babel-plugin-htmlbars-inline-precompile
Gathering detailed insights and metrics for babel-plugin-htmlbars-inline-precompile
Gathering detailed insights and metrics for babel-plugin-htmlbars-inline-precompile
Babel plugin to replace tagged template strings with precompiled HTMLBars templates
npm install babel-plugin-htmlbars-inline-precompile
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (89.45%)
TypeScript (10.55%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
9 Stars
523 Commits
21 Forks
10 Watchers
26 Branches
35 Contributors
Updated on Dec 08, 2024
Latest Version
5.3.1
Package Id
babel-plugin-htmlbars-inline-precompile@5.3.1
Size
21.16 kB
NPM Version
7.21.1
Node Version
14.18.1
Published on
Oct 26, 2021
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
5
21
Babel plugin to replace tagged .hbs
formatted strings with a precompiled version.
Can be used as either a normal function invocation or a tagged template string:
1import hbs from 'htmlbars-inline-precompile'; 2 3hbs`some {{handlebarsthingy}}`; 4hbs('some {{handlebarsthingy}}');
When used as a normal function invocation, you can pass additional options (e.g. to configure the resulting template's moduleName
metadata):
1import hbs from 'htmlbars-inline-precompile'; 2 3hbs('some {{handlebarsthingy}}', { moduleName: 'some/path/to/file.hbs' });
1var HTMLBarsCompiler = require('./bower_components/ember/ember-template-compiler'); 2var HTMLBarsInlinePrecompile = require('babel-plugin-htmlbars-inline-precompile'); 3 4require('babel').transform("code", { 5 plugins: [ 6 [HTMLBarsInlinePrecompile, {precompile: HTMLBarsCompiler.precompile}], 7 ], 8});
1import { module, test } from 'qunit'; 2import { setupRenderingTest } from 'ember-qunit'; 3import { render } from '@ember/test-helpers'; 4import hbs from 'htmlbars-inline-precompile'; 5 6module("my component", function(hooks) { 7 setupRenderingTest(hooks); 8 9 test('inline templates ftw', async function(assert) { 10 await render(hbs`hello!`); 11 12 assert.dom().hasText('hello!'); 13 }); 14});
results in
1import { module, test } from 'qunit'; 2import { setupRenderingTest } from 'ember-qunit'; 3import { render } from '@ember/test-helpers'; 4import hbs from 'htmlbars-inline-precompile'; 5 6module("my component", function(hooks) { 7 setupRenderingTest(hooks); 8 9 test('inline templates ftw', async function(assert) { 10 await render(Ember.HTMLBars.template(function() { 11 /* crazy HTMLBars template function stuff */ 12 })); 13 14 assert.dom().hasText('hello!'); 15 }); 16});
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
project is archived
Details
Reason
Found 2/27 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
53 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More