NetguruBootstrapper

Gem Version

This gem bootstraps Bootstrap for web apps.

Installation

Run:

gem install netguru_bootstrapper

Please note that this gem is designed to work with Bootstrap for Sass gem, so you should add:

gem 'bootstrap-sass'

to your application's Gemfile as well. If you're not using Rails, add Bootstrap from different source that fits your application needs.

Usage

$ netguru_bootstrapper install

Configuration

  • path - set root directory path (app/assets/stylesheets by default)
  • bootstrap-path - set Bootstrap GEM/package path (bootstrap by default)
$ netguru_bootstrapper install --path "root/directory/path" --bootstrap-path "bootstrap"

Non-Rails frameworks

If you're not using Rails you'll probably need to edit this line. You can learn more about this at Bootstrap for Sass wiki page.

Files organization

Tree structure

├── application.scss
├── components
   └── _your-custom-components-go-here.scss
├── views
   └── _your-view-based-styles-go-here.scss
├── framework
   ├── _components.scss
   ├── _overrides.scss
   ├── _variables.scss
   └── overrides
       └── _framework-overrides-go-here.scss
├── settings
   ├── _breakpoint-variables.scss
   ├── _color-variables.scss
   ├── _components-variables.scss
   ├── _typography-variables.scss
   ├── _views-variables.scss
   └── _z-index-variables.scss
└── utilities
    ├── _functions.scss
    ├── _mixins.scss
    ├── _shared.scss
    └── _typography.scss

Important files

framework/_components.scss

This file is a copy of bootstrap.scss file from bootstrap-sass gem. You can comment out components that you're not going to use.

framework/_variables.scss

Copy of bootstrap/variables.scss. To override variable simply uncomment line and remove !default flag.

For example:

// $font-size-base: 14px !default;

Becomes:

$font-size-base: 16px;

framework/_overrides.scss

Similar to Boostrap Components - all overrides are commented out by default. After uncommenting an override you need to add proper file to framework/overrides directory.

Changelog

You can find changelog here.

Contributing

  1. Fork it ( https://github.com/netguru/netguru_bootstrapper/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request