Class: Bootstrap::Generators::ScaffoldGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/twitter-bootstrap-scaffold.rb

Instance Method Summary collapse

Instance Method Details

#generate_scaffoldObject

——————-# generate_scaffold # ——————-#



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/twitter-bootstrap-scaffold.rb', line 14

def generate_scaffold
  # ディレクトリ作成
  empty_directory "app/assets/images/bootstrap"
  empty_directory "app/assets/javascripts/bootstrap"
  empty_directory "app/assets/stylesheets/bootstrap"
#        empty_directory "app/assets/images/bootstrap/one/two/three"

  # img/images
  copy_file( "templates/bootstrap/img/glyphicons-halflings-white.png", "app/assets/images/bootstrap/glyphicons-halflings-white.png" )
  copy_file( "templates/bootstrap/img/glyphicons-halflings.png", "app/assets/images/bootstrap/glyphicons-halflings.png" )

  # js/javascripts
  copy_file( "templates/bootstrap/js/bootstrap.js", "app/assets/javascripts/bootstrap/bootstrap.js" )
#        copy_file( "templates/bootstrap/js/bootstrap.min.js", "app/assets/javascripts/bootstrap/bootstrap.min.js" )

  # css/stylesheets
  copy_file( "templates/bootstrap/css/bootstrap-responsive.css", "app/assets/stylesheets/bootstrap/bootstrap-responsive.css" )
#        copy_file( "templates/bootstrap/css/bootstrap-responsive.min.css", "app/assets/stylesheets/bootstrap/bootstrap-responsive.min.css" )
  copy_file( "templates/bootstrap/css/bootstrap.css", "app/assets/stylesheets/bootstrap/bootstrap.css" )
#        copy_file( "templates/bootstrap/css/bootstrap.min.css", "app/assets/stylesheets/bootstrap/bootstrap.min.css" )
end