Socket
Socket
Sign inDemoInstall

node-inject-html-cli

Package Overview
Dependencies
29
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-inject-html-cli

A CLI interface for the node-insert-html library


Version published
Weekly downloads
117
decreased by-52.44%
Maintainers
1
Install size
796 kB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 21 Apr 2021

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc