1. Opennode_modules\gulp-rev\index.js
Line 144th Manifest[originalfile] == Originalfile + '? v= ' + File.revhash;
2. Open Node_modules\gulp-rev\nodemodules\rev-path\index.js
return filename + '-' + hash +return filename + ext;
3. Opennode_modules\gulp-rev-collector\index.js
if (Path.basename (Json[key]). Replace (new RegExp (opts.revsuffix), ')!==if (Path.basename ( Json[key]). Split ('? ') [0]!== Path.basename (key)) {
4, gulp replace the link of aspx file, garbled, resolved as follows:
Open Node_modules\gulp-rev-collector\index.js, Global search Mutables.foreach (, modify its code to:
Mutables.foreach (function(file) {if(!File.isnull ()) { varsrc = file.contents.toString (' UTF8 '); Changes.foreach (function(r) {src=src.replace (R.regexp, r.replacement); }); //src = "EF BB BF" + src; varContent =NewBuffer (src, "UTF8"); //Add a step to determine whether it is a document with a BOM varBomtag = ["239", "187", "191"]; if(! (content[0].tostring). toLowerCase () = = "EF" && content[1].tostring (+). toLowerCase () = = "BB" && Content[3].tostring (+). toLowerCase () = = "BF") ) {content= Buffer.concat ([NewBuffer (Bomtag), content], Content.length + 3); } file.contents=content; } This. push (file); }, This);
Gulp some important points in the process of automatically adding version numbers