Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

broccoli-asset-rev

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-asset-rev

broccoli asset revisions (fingerprint)

  • 0.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
113K
decreased by-5.43%
Maintainers
1
Weekly downloads
 
Created
Source

#broccoli-asset-rev

Broccoli plugin to add fingerprint checksums to your files and update the source to reflect the new filenames.

Turns

<script src="assets/appname.js">
background: url('/images/foo.png');

Into

<script src="https://subdomain.cloudfront.net/assets/appname-342b0f87ea609e6d349c7925d86bd597.js">
background: url('https://subdomain.cloudfront.net/images/foo-735d6c098496507e26bb40ecc8c1394d.png');

Installation

npm install broccoli-asset-rev --save-dev

Usage

var assetRev = require('broccoli-asset-rev');

var assetTree = assetRev(tree, {
  fingerprintExtensions: ['js', 'css', 'png', 'jpg', 'gif'],
  fingerprintExclude: ['fonts/169929'],
  replaceExtensions: ['html', 'js', 'css'],
  prependPath: 'https://subdomain.cloudfront.net/'
});

Options

  • fingerprintExtensions - Default: ['js', 'css', 'png'] - The file types to add md5 checksums.
  • fingerprintExclude - Default: [] - An array of strings. If a filename contains any item in the exclude array, it will not be fingerprinted.
  • replaceExtensions - Default: ['html', 'css'] - The file types to replace source code with new checksum file names.
  • prependPath - Default: '' - A string to prepend to all of the assets. Useful for CDN urls like https://subdomain.cloudfront.net/
  • customHash - Default: none - If defined, will be appended to filename instead of a md5 checksum.

Keywords

FAQs

Package last updated on 18 Jun 2014

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc