🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

node-inject-html-cli

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-inject-html-cli

A CLI interface for the node-insert-html library

0.0.1
Source
npm
Version published
Maintainers
1
Created
Source

node-inject-html-cli

A CLI interface for the node-inject-html library

Usage via global install

// Install Globally
$ npm install -g node-inject-html-cli

Then...

// Inject a script to index.html
$ inject-html -f index.html --headStart='<script src="https://someanalyticsfunction.com"></script>'
// Add a meta tag to all .html files
$ inject-html -f **/*.html --headEnd='<meta name="viewport" content="width=device-width, initial-scale=1">'

Usage via npx

// Inject a script to index.html
$ npx node-inject-html-cli -f index.html --headStart='<script src="https://someanalyticsfunction.com"></script>'
// Add a meta tag to all .html files
$ npx node-inject-html-cli -f **/*.html --headEnd='<meta name="viewport" content="width=device-width, initial-scale=1">'

Options

$ inject-html
Usage: inject-html [options]

Options:
      --version    Show version number                                 [boolean]
  -f, --file       File to inject, supports glob patterns             [required]
      --headStart  Inject content inside the opening <head>
      --headEnd    Inject content right before the closing </head>
      --bodyStart  Inject content inside the opening <body>
      --bodyEnd    Inject content right before the closing </body>
      --help       Show help                                           [boolean]

Keywords

node-inject-html

FAQs

Package last updated on 19 Apr 2021

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