gulp-hash-src
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -114,2 +114,4 @@ // jshint forin:true, noarg:true, noempty:true, eqeqeq:true, bitwise:true, onevar: true, strict:true, undef:true, unused:true, curly:true, node:true, newcap:true | ||
/// Have we already hashed this file, is the extention not whitelisted, or is it an absolute link (e.g., http://...)? | ||
/// If so, we don't need to hash it. | ||
if (hashes[link] || options.exts.indexOf(p.extname(link).toLowerCase()) === -1 || is_abs_link(link)) { | ||
@@ -125,3 +127,3 @@ return next(); | ||
if (options.verbose) { | ||
console.log("[gulp-hash-src] \"" + full_path + "\" does not exist. Cannot hash."); | ||
console.log("[gulp-hash-src] WARNING: \"" + full_path + "\" does not exist. Cannot hash."); | ||
} | ||
@@ -134,6 +136,9 @@ return next(); | ||
if (options.verbose) { | ||
console.log("[gulp-hash-src] \"" + full_path + "\" is a directory. Cannot hash."); | ||
console.log("[gulp-hash-src] WARNING: \"" + full_path + "\" is a directory. Cannot hash."); | ||
} | ||
return next(); | ||
} | ||
if (options.verbose) { | ||
console.log("[gulp-hash-src] Hashing \"" + full_path + "\"."); | ||
} | ||
fs_helper.hash(full_path, options.hash, options.enc, function onhash(hash) | ||
@@ -140,0 +145,0 @@ { |
{ | ||
"name": "gulp-hash-src", | ||
"description": "Add hashes to links in HTML/CSS", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Nathan Rugg", |
@@ -53,2 +53,6 @@ # gulp-hash-src | ||
## Note | ||
The files that are to be hash must be located in `build_dir` prior to running `hash_src()`. | ||
## Options | ||
@@ -89,3 +93,4 @@ | ||
verbose Whether or not to log info about missing files (default: false) | ||
verbose Whether or not to log info about what is happening (default: false) | ||
Useful for debugging | ||
``` | ||
@@ -92,0 +97,0 @@ |
8951
155
98