Open gockxml opened 11 years ago
I have the same problem. The grunt module works awesome, but this bug puzzles me. Has it any hack for the problem?
@qcgm1978 Haven't yet. If your case is not http/https sensitive, just ignore http/https
prefix and use <!-- build:js //code.jquery.com/jquery.min.js -->
, the browser can automatically complete the protocol in accord with current page.
If you must assign the protocol, one way you can do is hacking the code in <your_project>/node_modules/grunt-htmlrefs/task/grunt-htmlrefs.js
and replace :
to ::
at #Line105 and #Line129.
I'll have a look at this in the next few days.
On Fri, Aug 9, 2013 at 9:02 AM, Gock notifications@github.com wrote:
@qcgm1978 https://github.com/qcgm1978 Haven't yet. If your case is not http/https sensitive, just ignore http/https prefix and use , the browser can automatically complete the protocol in accord with current page. If you must assign the protocol, one way you can do is hacking the code in <your_project/node_modules/grunt-htmlrefs/task/grunt-htmlrefs.js and replace : to :: at #Line105https://github.com/tactivos/grunt-htmlrefs/blob/master/tasks/grunt-htmlrefs.js#L105and
Line129https://github.com/tactivos/grunt-htmlrefs/blob/master/tasks/grunt-htmlrefs.js#L129
.
— Reply to this email directly or view it on GitHubhttps://github.com/tactivos/grunt-htmlrefs/issues/11#issuecomment-22390048 .
Thank you very much. I will try you suggests. If the problem solves, the build process of my project would come to completion.
It works when grunt-htmlrefs.js modified as you describe. Thanks a lot.
File path with
http:
prefix would get a wrong src, which is truncated.the result:
As I dig into the code, I found the reason. It uses colon to concatenate file type and file path, then splits later.
Anyway, it is not a big problem. My suggestion is using
::
instead of:
. You can use whatever you want.