Socket
Socket
Sign inDemoInstall

grunt-asset-fingerprint

Package Overview
Dependencies
102
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    grunt-asset-fingerprint

Generates asset fingerprints


Version published
Weekly downloads
3.8K
increased by13.85%
Maintainers
1
Install size
1.36 MB
Created
Weekly downloads
 

Readme

Source

grunt-asset-fingerprint

Build Status

Overview

grunt-asset-fingerprint works by appending a hash to all asset files. Find and replace is then used to identify references to these assets in your code so that they point at the new fingerprinted assets. Ideally this task works best at the end of the build process.

Config

assetFingerprint: {
  "options": {
    "manifestPath": "dist/assets.json",
    "findAndReplaceFiles": [
      "dist/**/*.{js,css,html,xml}"
    ],
    "keepOriginalFiles": false,
    "cdnPrefixForRootPaths": "https://cdn.domain.com"
  },
  "dist": {
    "files": [
      {
        "expand": true,
        "cwd": "dist",
        "src": [
          "img/**/*",
          "webfonts/**/*",
          "js/app.js",
          "css/app.css"
        ],
        "dest": "dist"
      }
    ]
  }
}

Running Specs

  • clone this repo
  • npm install
  • grunt spec

Keywords

FAQs

Last updated on 10 May 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