Gathering detailed insights and metrics for ember-cli-htmlbars
Gathering detailed insights and metrics for ember-cli-htmlbars
Gathering detailed insights and metrics for ember-cli-htmlbars
Gathering detailed insights and metrics for ember-cli-htmlbars
babel-plugin-ember-template-compilation
Babel implementation of Ember's low-level template-compilation API
@types/htmlbars-inline-precompile
TypeScript definitions for htmlbars-inline-precompile
babel-plugin-htmlbars-inline-precompile
Babel plugin to replace tagged template strings with precompiled HTMLBars templates
ember-this-fallback
The default blueprint for ember-cli addons.
npm install ember-cli-htmlbars
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
77 Stars
1,015 Commits
67 Forks
14 Watching
23 Branches
64 Contributors
Updated on 15 Jan 2024
JavaScript (97.4%)
HTML (1.95%)
Handlebars (0.53%)
CSS (0.13%)
Cumulative downloads
Total Downloads
Last day
-12.4%
82,179
Compared to previous day
Last week
-5.7%
437,283
Compared to previous week
Last month
20.1%
1,979,604
Compared to previous month
Last year
-11.2%
26,120,113
Compared to previous year
14
51
@embroider/compat
3.4.3 or above (optional)You can add custom plugins to be used during transpilation of the addon/
or
addon-test-support/
trees of your addon (or the app/
and tests/
trees of an application)
by registering a custom AST transform.
1var SomeTransform = require('./some-path/transform'); 2 3module.exports = { 4 name: 'my-addon-name', 5 6 included: function() { 7 // we have to wrap these in an object so the ember-cli 8 // registry doesn't try to call `new` on them (new is actually 9 // called within htmlbars when compiling a given template). 10 this.app.registry.add('htmlbars-ast-plugin', { 11 name: 'some-transform', 12 plugin: SomeTransform 13 }); 14 15 this._super.included.apply(this, arguments); 16 } 17};
name
- String. The name of the AST transform for debugging purposes.plugin
- A function of type ASTPluginBuilder
.dependencyInvalidation
- Boolean. A flag that indicates the AST Plugin may, on a per-template basis, depend on other files that affect its output.cacheKey
- function that returns any JSON-compatible value - The value returned is used to invalidate the persistent cache across restarts, usually in the case of a dependency or configuration change.baseDir
- () => string
. A function that returns the directory on disk of the npm module for the plugin. If provided, a basic cache invalidation is performed if any of the dependencies change (e.g. due to a npm install/upgrade).Plugins that set the dependencyInvalidation
option to true
can provide function for the plugin
of type ASTDependencyPlugin
as given below.
Note: the plugin
function is invoked without a value for this
in context.
1import {ASTPluginBuilder, ASTPlugin} from "@glimmer/syntax/dist/types/lib/parser/tokenizer-event-handlers"; 2 3export type ASTDependencyPlugin = ASTPluginWithDepsBuilder | ASTPluginBuilderWithDeps; 4 5export interface ASTPluginWithDepsBuilder { 6 (env: ASTPluginEnvironment): ASTPluginWithDeps; 7} 8 9export interface ASTPluginBuilderWithDeps extends ASTPluginBuilder { 10 /** 11 * @see {ASTPluginWithDeps.dependencies} below. 12 **/ 13 dependencies(relativePath): string[]; 14} 15 16export interface ASTPluginWithDeps extends ASTPlugin { 17 /** 18 * If this method exists, it is called with the relative path to the current 19 * file just before processing starts. Use this method to reset the 20 * dependency tracking state associated with the file. 21 */ 22 resetDependencies?(relativePath: string): void; 23 /** 24 * This method is called just as the template finishes being processed. 25 * 26 * @param relativePath {string} A relative path to the file that may have dependencies. 27 * @return {string[]} paths to files that are a dependency for the given 28 * file. Any relative paths returned by this method are taken to be relative 29 * to the file that was processed. 30 */ 31 dependencies(relativePath: string): string[]; 32}
You can still provide a custom path to the template compiler (e.g. to test custom template compiler tweaks in an application) by:
1// ember-cli-build.js
2
3module.exports = function(defaults) {
4 let app = new EmberApp(defaults, {
5 'ember-cli-htmlbars': {
6 templateCompilerPath: `some_path/to/ember-template-compiler.js`,
7 }
8 });
9};
1var HtmlbarsCompiler = require('ember-cli-htmlbars'); 2 3var templateTree = new HtmlbarsCompiler('app/templates', { 4 isHTMLBars: true, 5 6 // provide the templateCompiler that is paired with your Ember version 7 templateCompiler: require('./bower_components/ember/ember-template-compiler') 8});
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
Found 3/8 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- 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
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
32 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 More