Skip to content

Commit

Permalink
stylesheet renames and generator
Browse files Browse the repository at this point in the history
  • Loading branch information
UnderpantsGnome committed Dec 30, 2010
1 parent a7b01c5 commit 115b751
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ test/dummy/public/javascripts/cache
test/dummy/public/stylesheets/*.css
test/dummy/public/stylesheets/cache
test/dummy/tmp/*
.sass-cache
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
%meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"}/
%link{:href => "/favicon.ico", :rel => "shortcut icon"}/
%link{:href => "/apple-touch-icon.png", :rel => "apple-touch-icon"}/
= stylesheet_link_tag 'style', 'grid', 'application'
= formtastic_stylesheet_link_tag
= stylesheet_link_tag 'grid', 'boilerplate', 'jabe', 'application'
= javascript_include_tag 'libs/modernizr-1.6.min.js'
%body
#container.container_12
Expand Down
5 changes: 1 addition & 4 deletions lib/generators/jabe/migrations/migrations_generator.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
require 'rails/generators'
require 'rails/generators/migration'

module Jabe
module Generators
class MigrationsGenerator < Rails::Generators::Base
include Rails::Generators::Migration

self.source_root(File.expand_path(JABE_DIR, 'templates', 'migrations')))
self.source_root(File.expand_path(File.join(Jabe::Engine.root, 'templates', 'migrations')))

desc "run this generator to create the necessary migrations"

Expand Down
9 changes: 9 additions & 0 deletions lib/generators/jabe/stylesheets/stylesheets_generator.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module Jabe
module Generators
class StylesheetsGenerator < Rails::Generators::Base
%w( grid boilerplate handheld jabe ).each do |sheet|
system("bundle exec sass #{Jabe::Engine.root}/app/stylesheets/#{sheet}.scss public/stylesheets/#{sheet}.css")
end
end
end
end
5 changes: 4 additions & 1 deletion lib/jabe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ class Engine < Rails::Engine
app.middleware.use ::ActionDispatch::Static, "#{root}/public"
::ActionController::Base.send(:helper, :jabe)
end

def self.root
JABE_DIR
end
end
end

0 comments on commit 115b751

Please sign in to comment.