Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@ryanburnette/asset-hash

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ryanburnette/asset-hash

[![repo](https://img.shields.io/badge/repository-Github-black.svg?style=flat-square)](https://github.com/ryanburnette/asset-hash) [![npm](https://img.shields.io/badge/package-NPM-green.svg?style=flat-square)](https://www.npmjs.com/package/@ryanburnette/as

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

asset-hash

repo npm

An asset hash script for static websites.

  • works in .css and .js files
  • find the hash of a given file
  • rename the file with the hash
  • gz the file in place for web servers that support precompressed assets
  • update all the references to the file
  • requires that all references be made from /, no relative references, TODO improve
  • works in place, so make a copy before calling if that matters

Install

npm install -g @ryanburnette/asset-hash

Use

assethash public/

Warning

I reference all my assets relative to root. This library expects that and will break if you aren't doing the same.

FAQs

Package last updated on 31 Jul 2020

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