Sha256: a5c0886257c4aa381cad8813644875d5da83865e03606ab70b25532b2fd7dcc9

Contents?: true

Size: 1014 Bytes

Versions: 11

Compression:

Stored size: 1014 Bytes

Contents

module Initial
  class BootstrapGenerator < Rails::Generators::Base
    source_root File.expand_path("../templates", __FILE__)

    def add
      gem 'bootstrap-sass'
      gem 'kaminari-bootstrap'
      gem 'bh'
      gem 'autoprefixer-rails'

      Bundler.with_clean_env do
        run "bundle install"
      end

      copy_file 'bootstrap/bootstrap-base.scss',
                'app/assets/stylesheets/shared/bootstrap-base.scss'
      copy_file 'bootstrap/bootstrap-init.coffee',
                'app/assets/javascripts/shared/bootstrap-init.coffee'
      copy_file 'bootstrap/bootstrap_flash_helper.rb',
                'app/helpers/bootstrap_flash_helper.rb'
      insert_into_file "app/assets/stylesheets/application.css",
                       "*= require shared/bootstrap-base\n",
                       after: "/*\n"
      prepend_to_file "app/assets/javascripts/application.js",
                       " //= require bootstrap\n
                         //= require_tree ./shared\n"

    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
teleporter-1.2.4 lib/generators/initial/bootstrap.rb
teleporter-1.2.3 lib/generators/initial/bootstrap.rb
teleporter-1.2.2 lib/generators/initial/bootstrap.rb
teleporter-1.2.1 lib/generators/initial/bootstrap.rb
teleporter-1.1.1 lib/generators/initial/bootstrap.rb
teleporter-1.1.0 lib/generators/initial/bootstrap.rb
teleporter-1.0.2 lib/generators/initial/bootstrap.rb
teleporter-1.0.1 lib/generators/initial/bootstrap.rb
teleporter-1.0.0 lib/generators/initial/bootstrap.rb
teleporter-0.1.0 lib/generators/initial/bootstrap.rb
teleporter-0.0.34 lib/generators/initial/bootstrap.rb