Sha256: 970acbe45514f0878196e909e4658f803fd7b9af218b73356520b817cf777451

Contents?: true

Size: 846 Bytes

Versions: 17

Compression:

Stored size: 846 Bytes

Contents

require 'rails/generators/active_record'
module Binco
  class InstallGenerator < Rails::Generators::Base
    desc 'Install bootstrap into your app'
    source_root File.expand_path("../templates", __FILE__)

    def create_application_scss
      copy_file 'stylesheet.scss', 'app/assets/stylesheets/application.scss'
    end

    def remove_file
      run 'rm app/assets/stylesheets/application.css'
    end

    def create_overrides
      copy_file '_bootstrap_variables.scss', 'app/assets/stylesheets/_bootstrap_variables.scss'
    end

    def add_javascripts
      inject_into_file 'app/assets/javascripts/application.js', after: '//= require turbolinks' do
        "\n//= require binco\n" +
        "//= require bootstrap-datepicker/locales/bootstrap-datepicker.es.js\n" +
        "//= require select2_locale_es"
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
binco-3.5.4 lib/generators/binco/install/install_generator.rb
binco-3.5.2 lib/generators/binco/install/install_generator.rb
binco-3.5.1 lib/generators/binco/install/install_generator.rb
binco-3.5.0 lib/generators/binco/install/install_generator.rb
binco-3.4.0 lib/generators/binco/install/install_generator.rb
binco-3.3.0 lib/generators/binco/install/install_generator.rb
binco-3.2.1 lib/generators/binco/install/install_generator.rb
binco-3.2.0 lib/generators/binco/install/install_generator.rb
binco-3.1.6 lib/generators/binco/install/install_generator.rb
binco-3.1.5 lib/generators/binco/install/install_generator.rb
binco-3.1.4 lib/generators/binco/install/install_generator.rb
binco-3.1.3 lib/generators/binco/install/install_generator.rb
binco-3.1.2 lib/generators/binco/install/install_generator.rb
binco-3.1.1 lib/generators/binco/install/install_generator.rb
binco-3.1.0 lib/generators/binco/install/install_generator.rb
binco-3.0.2 lib/generators/binco/install/install_generator.rb
binco-3.0.1 lib/generators/binco/install/install_generator.rb