
Product
Introducing GitHub Actions Scanning Support
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.
compile-htm
Advanced tools
CLI tool to compile htm template literals into standard JavaScript builder functions for use with React, Preact, or other libraries.
Compile JavaScript code with JSX htm template literals (html``) to standard javascript with builder functions over CLI.
This tool works with React, Preact or any other library using JSX syntax.
This uses babel-plugin-htm.
npm install -g compile-htm
or access directly via npx:
npx compile-htm --help
compile-htm - v1.0.0
Compile htm template literal code to standard JavaScript builders
Positionals:
inputFile Input file path
Options:
--builder Builder function to use (default: h)
--output Output file to use (default: null)
Usage:
compile-htm <inputFile> [--builder functionName] [--output fileName]
compile-htm input.js Compile input.js into input.compiled.js
html`<span>I use <div>Template</div><p with="properties">Strings!</p><${Box}><${Cat} /></${Box}></span>`
will be converted into
h("span", null, "I use ", h("div", null, "Template"), h("p", {
"with": "properties"
}, "Strings!"), h(Box, null, h(Cat, null)));
FAQs
CLI tool to compile htm template literals into standard JavaScript builder functions for use with React, Preact, or other libraries.
The npm package compile-htm receives a total of 1 weekly downloads. As such, compile-htm popularity was classified as not popular.
We found that compile-htm demonstrated a healthy version release cadence and project activity because the last version was released less than 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.