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

Handling assets (relative paths, fonts) correctly #83

Closed
jmuheim opened this issue May 7, 2014 · 4 comments
Closed

Handling assets (relative paths, fonts) correctly #83

jmuheim opened this issue May 7, 2014 · 4 comments

Comments

@jmuheim
Copy link

jmuheim commented May 7, 2014

Hello!

I really appreciate bower-rails, but so far it seems to be only useful for js-only packages.

I tried to get Bootstrap to work, and while figuring out how to integrate it correctly into my development process, it doesn't work for production, as there are some issues with relative paths and other assets (like e.g. fonts), as you may already know.

Are you interested in some help fixing these? I'm thinking of two things:

  1. Fix the relative assets problem. I think this shouldn't be a big problem, as resolve_asset_paths looks pretty simple. Instead of converting the .css file into a .css.erb file I suggest replacing all file paths directly and saving the file as normal .css file.

  2. Copy additional assets to public/assets. This should be possible, too. I don't really know where's specified which files should be available for use (I could imagine that it's the main directive), but then we could simply copy the files to the Rails public/assets directory.

@SergeyKishenin
Copy link
Collaborator

Yes! Any help is appreciated. But there are some points that I'd like to clarify.

  1. Should we try to find out why sprockets is not seeing css.erb files under vendor/assets/bower_components even we confiure extensions at application.rb with config.assets.precompile << ['*.js', '*.css', '*.css.erb'] (ref)? Is it spread only on app/assets dir? But we have bower_components in assets.paths. Should we try to open a sprockets-rails issue maybe?

  2. I don't find it the best idea to copy files to public/assets. There is already the issue opened that says that this case can be handled with config.assets.precompile.

If we follow the link to Rails' pull and see files we should notice that vendor and lib dirs should be included by hand.

So does it mean we should just configure sprockets properly?

@jmuheim
Copy link
Author

jmuheim commented May 7, 2014

I'll take a further look into the mentioned topics soon. Gotta go now. TTYL.

@jmuheim
Copy link
Author

jmuheim commented May 8, 2014

@SergeyKishenin, I decided to stick with rails-assets.org. It feels more natural to be able to simply do a //= require bootstrap-formhelpers instead of manually having to find the correct files to require, etc. Also it's cooler to only edit one file for both gems and assets, compared to having another Bowerfile file.

I read somewhere that you are planning to join forces with rails-assets.org? I wish both projects big success, having a working solution for assets management is highly anticipated by the Rails community and long overdue.

Thank you for your work!

@SergeyKishenin
Copy link
Collaborator

Yes, we are! But now the development is stopped because of lack of time :( Hope, we'll get back to it asap.

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