railslove / fontello_rails_converter

CLI gem for comfortably working with icon fonts (open, download, convert) from http://fontello.com for usage in Rails apps.
MIT License
73 stars 35 forks source link

Both fontello.css and fontello.scss are converted #33

Closed ka8725 closed 9 years ago

ka8725 commented 9 years ago

Having this exception in rails app:

It's not clear which file to import for '@import "fontello"'. Candidates: fontello.css fontello.scss Please delete or rename all but one of these files.

I think only one fontello.css or fontello.scss is enough.

jhilden commented 9 years ago

For rails apps you definitely want to use the fontello.scss file (which you should be able to get by explicitly do @import "fontello.scss"), but I'm trying to make the code more flexible for other environments/frameworks and they might want to use the pur CSS version.

Do you have a suggestion on which way it should behave?

ka8725 commented 9 years ago

May be detect current environment?

if defined?(Rails)
  generate_scss
else
  generate_css
end
dlackty commented 9 years ago

In our case we need to manually delete on of them to make Sprockets assets precompiling work.

jhilden commented 9 years ago

I changed master, so that the source .css stylesheet in favor of the .scss version. At some point I might add an option to disable conversion if one is not in a Rails context. It would be nice if you could try it out and report if it works as expected.

dlackty commented 9 years ago

@jhilden Left a comment on the commit. Could you please have a look?

jhilden commented 9 years ago

I just released version 0.4.2 which should fix this issue. Let me know if something is still not working.