
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
cortex-handlebars-compiler
Advanced tools
Handlebar helpers for cortex template.
$ npm install cortex-handlebars-compiler --save
var compiler = require('cortex-handlebars-compiler');
Returns the compiler.Compiler
instance.
A single compiler instance only cares about one template file.
Object
Object
object of cortex.jsonObject
object of cortex-shrinkwrap.jsonpath
the root directories of current project.path
path of the current template fileurl
the url base of the hyper reference, 'efte://efte'
for example.String
template stringParses the template string and returns function(data)
the parsed function.
template:
<body>
{{{facade 'a@1.0.0'}}}
</body>
instance.compile(template)();
Then you will get: (which is beautified)
<html>
<head></head>
<body>
<script src="../../../neuron/5.1.0/neuron.min.js"></script>
<script>
neuron.config({
ranges: tree
path: "../../../"
});
</script>
<script>
facade({
mod:"cortex-hybrid-sample@0.1.0"
});
</script>
</body>
</html>
String
the name of the helperfunction(title, helper_options)
see handlebars for detailsRegisters a new helper handler.
Returns this
.
{{{facade '<package-name>'}}}
The first 'facade' will also output the engines and configurations.
{{{href '<link>'}}}
Creates a special link to navigate through business units
Relative links: ./page.html
External link to other units: <unit-name>/path/to.html
<!--
If the current unit is 'foo',
and the current template is 'template/a.html'
-->
<a href="{{{href './b.html'}}}" >link</a>
<a href="{{{href 'bar/folder/index.html'}}}">external link</a>
You will get:
<a href="efte://efte/foo/template/a.html">link</a>
<a href="efte://efte/bar/folder/index.html">external link</a>
MIT
FAQs
Handlebar helpers for cortex template.
The npm package cortex-handlebars-compiler receives a total of 5 weekly downloads. As such, cortex-handlebars-compiler popularity was classified as not popular.
We found that cortex-handlebars-compiler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.