Socket
Socket
Sign inDemoInstall

hash-inject-cli

Package Overview
Dependencies
1
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    hash-inject-cli

This for inject hash of build files into html file


Version published
Weekly downloads
16
decreased by-11.11%
Maintainers
1
Install size
64.5 kB
Created
Weekly downloads
 

Readme

Source

Example:

Input

./index.html
<!DOCTYPE html>
<html>
  <head>
    <base href="/"/>
    <meta charset="UTF-8"/>
    <meta name="theme-color" content="#000"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="#000"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimal-ui"/>
    <title>App</title>
    <link rel="stylesheet" href="/mn.css?hash="/>
  </head>
  <body>
    <div id="root">
      <noscript>You need to enable JavaScript to run this app.</noscript>
    </div>
    <script src="/app.js?hash="></script>
  </body>
</html>
hash-inject -f ./index.html

Output

<!DOCTYPE html>
<html>
  <head>
    <base href="/"/>
    <meta charset="UTF-8"/>
    <meta name="theme-color" content="#000"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="#000"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimal-ui"/>
    <title>App</title>
    <link rel="stylesheet" href="/mn.css?hash=6d26ab51456043be"/>
  </head>
  <body>
    <div id="root">
      <noscript>You need to enable JavaScript to run this app.</noscript>
    </div>
    <script src="/app.js?hash=560e6d26ab43b514"></script>
  </body>
</html>

Keywords

FAQs

Last updated on 08 Sep 2020

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