grunt-asset-fingerprint
Advanced tools
Comparing version 0.2.1 to 0.3.0
{ | ||
"name": "grunt-asset-fingerprint", | ||
"description": "Generates asset fingerprints", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"homepage": "https://github.com/testdouble/grunt-asset-fingerprint", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -7,11 +7,31 @@ # grunt-asset-fingerprint | ||
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 | ||
```js | ||
assetFingerprint: { | ||
options: { | ||
algorithm: 'md5', | ||
"options": { | ||
"manifestPath": "dist/assets.json", | ||
"findAndReplaceFiles": [ | ||
"dist/**/*.{js,css,html,xml}" | ||
], | ||
"keepOriginalFiles": false, | ||
"cdnPrefixForRootPaths": "https://cdn.domain.com" | ||
}, | ||
dist: { | ||
src: ["dist/**/*"] | ||
dest: "dist/" | ||
}, | ||
"dist": { | ||
"files": [ | ||
{ | ||
"expand": true, | ||
"cwd": "dist", | ||
"src": [ | ||
"img/**/*", | ||
"webfonts/**/*", | ||
"js/app.js", | ||
"css/app.css" | ||
], | ||
"dest": "dist" | ||
} | ||
] | ||
} | ||
} | ||
@@ -18,0 +38,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
9050
15
7
43