Neutralize Pesky Miscreants
    Wondering what’s next for npm?Check out our public roadmap! »

    grunt-asset-fingerprint

    0.4.0 • Public • Published

    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

    Install

    npm i grunt-asset-fingerprint

    DownloadsWeekly Downloads

    611

    Version

    0.4.0

    License

    none

    Unpacked Size

    9.76 kB

    Total Files

    15

    Last publish

    Collaborators

    • avatar