-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decouple build paths of HTML template and compiled asset #37
Comments
Maybe you need alternate search path?
|
Yes, tried that, but that only affects input, where it looks for files, so I can define: <!-- build:js(/public-html/uncompiled-js/) /js/compiled.js --> And it will correctly find the uncompiled JS files, but the compiled file will still be stored to |
Maybe:
|
Looks promising, thanks! |
@mzgajner Just made this branch for use in a build process at work, added ability decouple bundle and build path, as well as ability to add an async tag. https://github.com/dgwaldo/gulp-usemin |
I have a HTML template file placed in a random internal location (wherever the framework decides it stores templates). My publicly visible web folder is stored elsewhere.
Because of this structure, I have a few problems to overcome. In the template, I define blocks normally:
<!-- build:js js/lib.js -->
The path in this block is the path I want to appear in the processed HTML file, but gulp-usemin assumes that the processed JS file should also be stored according to this path, relative to my HTML template. This is not the case.
To give a more literal example, these steps are needed:
/project-source/templates/dev/template.html
needs to compile to/project-source/templates/prod/template.html
/public-html/uncompiled-js/*.js
need to compile to/public-html/js/compiled.js
/js/compiled.js
I think this a pretty common use case, since frameworks can often store their templates somewhere different than the static JS/CSS files. Is there a way to configure gulp-usemin to achieve what I want?
The text was updated successfully, but these errors were encountered: