Skip to content
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

Nested assets aren't handled #4

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

Nested assets aren't handled #4

pbiggar opened this issue Feb 24, 2012 · 4 comments

Comments

@pbiggar
Copy link
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?

@pbiggar
Copy link
Contributor Author

pbiggar commented Feb 24, 2012

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

@jxa
Copy link
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.

@pbiggar
Copy link
Contributor Author

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).

@jxa
Copy link
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.

@jxa jxa mentioned this issue Mar 7, 2012
@jxa jxa mentioned this issue Mar 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants