gulp-useref icon indicating copy to clipboard operation
gulp-useref copied to clipboard

Update index.js

Open bonm opened this issue 7 years ago • 7 comments

Usefull fix for user parametrs example <!-- build:js /js/all.js?rev=1234 -->

bonm avatar Dec 18 '17 18:12 bonm

Coverage Status

Coverage increased (+0.01%) to 98.16% when pulling ad578bb693a13ded89529231137d2ae373d86500 on bonm:patch-1 into c13848700f7a1194e9484aa2c95aa710030f11f4 on jonkemp:master.

coveralls avatar Dec 18 '17 18:12 coveralls

@bonm I want to make sure I fully understand. This change just removes the url parameters from the path before passing it on?

jonkemp avatar Dec 18 '17 18:12 jonkemp

@jonkemp yes. file can't create with param at file system

...
<head>
<!-- build:js /js/all.js?rev=@@hash -->
<script type="text/javascript" 
...
<!-- endbuild -->

</head>

gulp build
...
[13:54:23] Error: ENOENT: no such file or directory, open 'D:\project\newApp\ru\js\all_m.js?rev=@@hash'
    at Error (native)
stream.js:74
      throw er; // Unhandled stream error in pipe.
      ^

bonm avatar Dec 19 '17 12:12 bonm

Could you add a test for this?

jonkemp avatar Dec 19 '17 13:12 jonkemp

Also, why would you add a parameter like that to throw it away? I think most people use something like this plugin:

https://github.com/sindresorhus/gulp-rev

jonkemp avatar Dec 19 '17 13:12 jonkemp

I use https://github.com/bustardcelly/gulp-rev-append

bonm avatar Dec 26 '17 06:12 bonm

@jonkemp

Could you add a test for this?

Yes, i try

bonm avatar Dec 26 '17 06:12 bonm