grunt-asset-fingerprint

Generates asset fingerprints

13 个版本
安装
npm install grunt-asset-fingerprint
yarn add grunt-asset-fingerprint
pnpm add grunt-asset-fingerprint
bun add grunt-asset-fingerprint
README

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
版本列表
0.4.0 2021-05-10
0.3.2 2021-05-04
0.3.1 2021-05-04
0.3.0 2017-02-09
0.2.1 2014-04-12
0.2.0 2014-04-06
0.1.3 2014-02-21
0.1.2 2014-02-03
0.1.1 2014-02-02
0.1.0 2014-01-29
0.0.3 2013-12-12
0.0.2 2013-12-06
0.0.1 2013-11-22