lib/playmo/recipes/layout_recipe.rb in playmo-0.0.18 vs lib/playmo/recipes/layout_recipe.rb in playmo-0.1.0

- old
+ new

@@ -1,20 +1,10 @@ -module Playmo - module Recipes - class LayoutRecipe < Playmo::Recipe - source_root File.expand_path('../templates/layout_recipe', __FILE__) - - def setup - silently do - Event.events.listen(:after_install) do |event_data| - remove_file 'app/views/layouts/application.html.erb' - generate :layout, "application #{retrieve(:markup)}" - end - end - end - end +recipe :layout do + description 'This will generate HTML5-ready layout for your app' + after :javascript_framework + + # TODO: Add option to make separate files for header & footer + silently do + remove_file 'app/views/layouts/application.html.erb' + generate :layout, "application #{retrieve(:markup)}" end -end - -# Write down this recipe to our Cookbook if it's available -require File.dirname(__FILE__) + '/javascript_framework_recipe' -Playmo::Cookbook.instance.insert_after(Playmo::Recipes::JavascriptFrameworkRecipe, Playmo::Recipes::LayoutRecipe) if defined?(Playmo::Cookbook) +end \ No newline at end of file