New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

edgejs-cli

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edgejs-cli

CLI utility to generate files based on edge templates

  • 1.0.0
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

edgejs-cli

:warning: Maturity Level: Alpha

Minimal CLI utility to generate files using edge.js templates

Usage

pnpm i -g edgejs-cli # Will add an edget utility to PATH

# Render a single template
edget -i templates/home.edge -o site/home.html 

# Pass data to templates through a JSON/YAML file
edget -i templates/home.edge -o site/home.html -c context.json

# Render all templates in a directory (Files prefixed with . or _ are ignored)
edget -i templates -o site -c context.json

# Skip escaping if generating non-html content
edget -i sql-templates -o sql --skipEscaping

Use cases

This is intended to be a minimal utility that simplifies tasks like below for JS/TS developers comfortable with CLI:

  • Building static sites
  • Knowledge-graphs
  • Code generation

Motivations

If you don't care about cross-language support, edgejs is easier than Handlebars/mustache/liquid etc. because the embedded expressions are plain JS - so there is less need to learn custom syntax specific to the templating language, and we also have first class support for async.

Also unlike JSX based solutions, it is more versatile because it is not limited to HTML


:warning: This project has nothing to do with Microsoft edge browser.

Keywords

FAQs

Package last updated on 15 Nov 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc