-
Notifications
You must be signed in to change notification settings - Fork 22
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
How to link to concatinated resources #9
Comments
Hi Murtaza, There are 2 ways you can link to your file. If you just want to test it out you can link to "/assets/css/app.css". Dieter will redirect to the proper path. What you'll want to do in production is to use the link-to-asset function. For example
Regards, |
Hi John, Thanks for the quick reponse. John however I want to link to the concatinated file. Lets say I have 3 css files - All these files are listed in the .dieter file. Now how do I link to the single concatinated css file? Thanks, |
Your app.css.dieter file describes how to build the app.css asset. When you request the "/assets/css/app.css" path, dieter first looks for a file with that exact name. When that file is not found, it checks for files that start with "/assets/css/app.css" and your app.css.dieter file is found, assets are concatenated, and the asset is served. Hopefully this clears up the intent. Let me know if you have any issues. |
Hi, I'm also confused here. JS is working perfectly, but CSS not so much.
Using: Returns Also, it's creating this file: Am I missing something obvious? |
It should be If you have time to fix the docs about this and submit a PR, that would be much appreciated! |
Okay, thanks for replying! I'm making progress, but I'm still a little confused. Is a web request to How is the development environment supposed to look? P.S. I'd be happy to document the mime type as soon as I can sort this out... |
Perhaps this requires a small modification to |
It's supposed to return the compiled file, not the file as is. I was confused about wrap-dieter-mime-types: it's included as part of the dieter middleware (see dieter.core/asset-pipeline). It should be worknig in dev mode though, and I confirmed it works for me on .js.dieter files. I don't use .css.dieter files, so there may be a bug there. |
Okay, got it fixed. |
now I'm actually confused as to why wrap-dieter-mime-type is required at all - isn't it called as part of asset-pipeline? |
Now, how bout' that. It sure is. I MUST have done something wrong, then. I'll check again... |
Okay, I think I've gotten to the bottom of it. It appears a bug exists in branch
The bottom appeal to Any chance a new version can be deployed? |
@jxa New version? |
Pushed 0.4.1. Also, @pbiggar I granted you deploy permissions on clojars. Thanks! |
Thanks so much, guys, for all your help! You've been super responsive. |
Hi,
Thanks for the project, needed your help in linking.
I have created a assets/css folder and placed all css in it. I would like to concatinate all the css files such that only one file is served. I have also created a app.css.dieter file in the above folder listing all the css files.
How do I link back to the concatinated file?
Thanks,
Murtaza
The text was updated successfully, but these errors were encountered: