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
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
Node Version
NPM Version
9 Stars
523 Commits
21 Forks
11 Watching
26 Branches
35 Contributors
Updated on 23 Aug 2022
Minified
Minified + Gzipped
JavaScript (89.45%)
TypeScript (10.55%)
Cumulative downloads
Total Downloads
Last day
-12.2%
40,118
Compared to previous day
Last week
-11.8%
217,216
Compared to previous week
Last month
21.9%
1,024,853
Compared to previous month
Last year
-2.5%
14,528,155
Compared to previous year
5
21
⚠️ Archived ⚠️
This library has been superceded by babel-plugin-ember-template-compilation and ember-template-imports.
Depending on a consumer's ember-source version, ember-cli-htmlbars will select whether to use babel-plugin-htmlbars-inline-precompile
or babel-plugin-ember-template-compilation
- based on this code -- i.e: after ember-source@3.27.0-alahpa.1
, only babel-plugin-ember-template-compilation
will be used.
At the time of archiving this repo, ember-source@3.x
is not under LTS
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 dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
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
47 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
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 Morebabel-plugin-ember-template-compilation
Babel implementation of Ember's low-level template-compilation API
@types/htmlbars-inline-precompile
TypeScript definitions for htmlbars-inline-precompile
ember-cli-htmlbars
A library for adding htmlbars to ember CLI
@babel/plugin-transform-regexp-modifiers
Compile inline regular expression modifiers