Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Nested assets aren't handled #4

Open
pbiggar opened this Issue Feb 24, 2012 · 4 comments

Comments

Projects
None yet
2 participants
Contributor

pbiggar commented Feb 24, 2012

I want to take a look at nested assets, that is for example, I have a CSS file which references an image. Have you thought of a good way to deal with this, that you can suggest?

Contributor

pbiggar commented Feb 24, 2012

Similarly, I find myself needing routes in my Haml, which are defined at the moment in noir.

Member

jxa commented Feb 24, 2012

So far I have not been using dieter for image assets. I have been putting them in resources/public and serving them directly, hard-coding the path in the css file. I know Rails puts images in the pipeline, but I personally have never felt the need to do so.

I'll have to think about haml routes. I see how they would be necessary. As a work-around you can use the route to the asset without the sha, i.e. <script src="/assets/data.js" Dieter will handle the redirect.

Contributor

pbiggar commented Feb 25, 2012

I want images in the pipeline so they get md5 tags and so that its clear that we shouldnt get an old cached version (especially important during a migration between views - when some front-end servers have different code than others).

The workaround will have to do for now, but it wont be good for long. I'm thinking perhaps the preprocessors could be passed a function that they could use to get an asset link, and do appropriate parsing of their inputs (eg haml's links are usually quoted, but css' are in parens, a simple regex should be workable for now).

Member

jxa commented Mar 1, 2012

I began spiking some code with the ultimate goal of supporting non-text assets and inter-asset linkage. Hopefully will have something to show soon-ish.

This was referenced Mar 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment