config.rb in refills-0.0.1 vs config.rb in refills-0.0.2
- old
+ new
@@ -55,22 +55,26 @@
set :js_dir, 'javascripts'
set :images_dir, 'images'
helpers do
- def snippet(snippet_name)
- partial 'snippet', locals: { snippet: snippet_name }
+ def snippets(snippet_name)
+ partial 'snippets', locals: { snippet_name: snippet_name }
end
def html_snippet(partial_name)
- partial 'html_snippet', locals: { snippet: partial_name }
+ snippet = partial(partial_name)
+
+ partial 'snippet', locals: { snippet: snippet, language: 'markup' }
end
- def stylesheet_snippet(snippet)
+ def stylesheet_snippet(snippet_name)
source_dir = File.expand_path('../source', __FILE__)
- snippet_filename = "_#{snippet}.scss"
+ snippet_filename = "_#{snippet_name}.scss"
snippet_path = File.join(source_dir, 'stylesheets', 'refills', snippet_filename)
- partial 'stylesheet_snippet', locals: { file_path: snippet_path }
+ snippet = File.read(snippet_path)
+
+ partial 'snippet', locals: { snippet: snippet, language: 'scss' }
end
end
ready do
sprockets.append_path 'vendor/stylesheets'