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

Issue loading assets from an uberjar #1

Open
andyparsons opened this issue Feb 16, 2015 · 4 comments
Open

Issue loading assets from an uberjar #1

andyparsons opened this issue Feb 16, 2015 · 4 comments

Comments

@andyparsons
Copy link

Hello, it appears that optimus-sass only works in a local environment and not an uberjar build due to it's use of io/file instead of io/resource:

Please see: https://github.com/DomKM/optimus-sass/blob/master/src/optimus_sass/core.clj#L18

and the original issue logged against optimus:
magnars/optimus#35

@domkm domkm closed this as completed in 1f9997b Feb 17, 2015
@domkm domkm reopened this Feb 17, 2015
@domkm
Copy link
Owner

domkm commented Feb 17, 2015

Thanks for the report, @andyparsons. I deployed 0.1.0-SNAPSHOT with the io/file -> io/resource change. Give it a try and let me know if it solves your problems. Thanks!

@andyparsons
Copy link
Author

Thanks for the quick fix. Looks good and I'll give it a try.

@radhikalism
Copy link

@domkm,

This fix doesn't seem to work. existing-resource from Optimus already returns a resource URL, so passing it through io/resource again produces a type error. I'm not sure if you meant to remove the call to existing-resource, or if you want to delete the io/resource invocation.

Also, because a resource URL isn't a File, compile-file fails with IllegalArgumentException. Is that argument type hint necessary?

This worked for me, for loading from a file and also from a webjar: radhikalism@b4181dd

@domkm
Copy link
Owner

domkm commented Aug 5, 2015

Thanks for trying and fixing this, @arbscht. Would you like to submit a PR?

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

3 participants