1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-28 09:24:24 +01:00

simpler way to import scss from plugins

This commit is contained in:
Nicolas Florentin 2016-05-11 09:47:30 +02:00
parent 0c00bf5895
commit a47a78fe9c
3 changed files with 4 additions and 6 deletions

View File

@ -35,8 +35,7 @@
@import "app.responsive"; @import "app.responsive";
<% FabManager.plugins.each do |plugin| %> <% PluginRegistry.stylesheets.each do |stylesheet| %>
<% plugin.styles.each do |style| %> <% basename = File.basename(stylesheet,'.scss') %>
<%= "@import '#{style}';" %> <%= "@import '#{basename}';" %>
<% end %>
<% end %> <% end %>

View File

@ -62,7 +62,7 @@ module Plugin
assets << [full_path, opts] assets << [full_path, opts]
end end
def register_css(style) def register_css(style) # useless ?
styles << style styles << style
end end

View File

@ -1,7 +1,6 @@
register_asset "stylesheets/navi_gami.scss" register_asset "stylesheets/navi_gami.scss"
register_asset "javascripts/navi_gami.coffee.erb" register_asset "javascripts/navi_gami.coffee.erb"
register_css('navi_gami')
PLUGIN_NAME ||= "navi_gami".freeze PLUGIN_NAME ||= "navi_gami".freeze