You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ejsrun

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ejsrun

Runs ejs from the command line to produce HTML from ejs templates and multiple data sources

0.1.0
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

ejsrun 🏃🏻‍♂️

A command line runner for EJS - similar to ejs-cli

I wrote this (quickly) because I needed to create templates for a project that merged various options before sending to EJS for processing.

Also, I prefer to keep my options in an HJSON file.

Features

  • Allows multiple -O options with parameters and merges them to pass to the ejs processor. This allows you to have various levels of providing values (think default values and overrides, and/or configuration values and override on command line, etc.)
  • Can use with HJSON files (my preferred configuration file format)
  • Specify multiple ejs files on the command line (or even a glob) and output files are created with same name (and .html extension).

Example

ejsrun pages/*.ejs -O defaults.json -O config.hjson -O "{\"develop\":true}"

The above example processes all .ejs pages within the pages directory and creates files with the same names and .html extension after processing with EJS. The data used in the template substitutions is a combination of the JSON from defaults.json, with overrides from the config.hjson and a final override of develop: true.

FAQs

Package last updated on 18 Jun 2018

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