How to specify different relative assets path
See original GitHub issueRelated to this feature request: https://github.com/jonkemp/gulp-useref/issues/106
I have this folder structure:
app
---- js
-------- script.js
---- html
-------- index.html
But instead useref compiles my assets (js) inside the html folder and I’m looking for an option to specify a different relative path for the assets.
useref html block code:
<!-- build:js /app/js/script.js -->
<script src="..\js\script1.js" async></script>
<script src="..\js\script2.js" async></script>
<!-- endbuild -->
Useref correctly replaces the path in the compiled html file of the js assets with /app/js/script.js but as written above, doesn’t compile in the correct folder the assets (that is not app/html/app/js/script.js but app/js/script.js). The option needed should be like “outputRelativePath” of gulp-usemin
Thanks for attention
Issue Analytics
- State:
- Created 8 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Absolute and Relative Paths
First let's take a simple structure. By prefixing the first slash (/) in the path with a single (.)
Read more >Paths explained: Absolute, relative, UNC, and URL—Help
A relative path refers to a location that is relative to a current directory. Relative paths make use of two special symbols, a...
Read more >Angular 5 fix relative path for Assets/ folder - Stack Overflow
So I went from http://localhost:7777/service1/upload to http://localhost:7777/test/service1/upload . Now I am having an other unfixed issue with ...
Read more >Relative and absolute paths, in the file system and on the web ...
The simplest example of relative path is just a file name, like index.html . So one should be careful with relative paths. If...
Read more >What are the differences between absolute and relative paths?
Relative paths use the same principle. Suppose you're in /var/log/foo and you want to view a file in /var/log/bar .
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have an scenario a little different.
file.jade
and gulp task
On run, gulp overwrite my file correctly 😄
But the file is create in the same path 😢
dist/scripts/client.js
and I can find a way to put on the compile file in the right pathdist/public/scripts/client.js
I try to set base, but I’m sure that is not the way. I need some opton that let me prefix the save path that come from “useref”.
Some Ideas?
I fix this, I don’t remember well how but I think that was something like this.
If someone can test and confirm, will be nice.