Socket
Socket
Sign inDemoInstall

grunt-asset-fingerprint

Package Overview
Dependencies
30
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.1 to 0.3.0

spec/fixtures/background.png

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc