16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/generators/boring/font_awesome/ruby_gem/install/install_generator.rb', line 16
def import_font_awesome_stylesheet
say "Adding font awesome stylesheets", :green
stylesheet_font_awesome_imports = <<~RUBY
\n
@import "font-awesome-sprockets";
@import "font-awesome";
RUBY
if File.exist?("app/assets/stylesheets/application.css.scss")
append_to_file "app/assets/stylesheets/application.css.scss", stylesheet_font_awesome_imports
elsif File.exist?("app/assets/stylesheets/application.scss")
append_to_file "app/assets/stylesheets/application.scss", stylesheet_font_awesome_imports
else
say <<~WARNING, :red
ERROR: Looks like the application.css.scss is missing. Please rename the file and re-run the generator.
WARNING
end
end
|