Skip to content

Commit

Permalink
Merge pull request #141 from carbonfive/chores/remove-bootstrap
Browse files Browse the repository at this point in the history
Add information of how to add Bootstrap
  • Loading branch information
Mr Rogers authored Jan 2, 2020
2 parents 50d6a27 + b711050 commit 03c07eb
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 11 deletions.
54 changes: 43 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Major tools/libraries:
* PostgreSQL
* Slim
* Sass
* Bootstrap
* RSpec and Capybara
* Factory Bot
* SimpleCov
Expand All @@ -27,8 +26,7 @@ Major tools/libraries:
the details).

Raygun includes generator templates for controllers, views, and specs so that generated code follows best
practices. For example, view generation produces bootstrap compatible markup and rspec specs use factory
girl when appropriate.
practices. For example, rspec specs use factory bot when appropriate.

Inspired by Xavier Shay work at Square and ThoughtBot's Suspenders. Thanks!

Expand Down Expand Up @@ -59,20 +57,54 @@ another ruby, just change the `Gemfile` and `.ruby-version` as necessary.

## Usage

$ raygun your-project
```bash
$ raygun your-project
```

Once your project is baked out, you can easily kick the wheels. Be sure that you have the prerequisites
covered (see above).

$ cd your-project
$ bin/setup
```bash
$ cd your-project
$ bin/setup

# Run the specs, they should all pass
$ bin/rake
# Run the specs, they should all pass
$ bin/rake

# Fire up the app and open it in a browser
$ heroku local
$ open http://localhost:3000
```

## Next Steps

As you'll notice, the project comes with enough CSS (SCSS, actually) to establish some patterns. If you
need more of a framework, here are instructions on how to add Bootstrap to your new project.

```bash
$ yarn add bootstrap
$ rails generate simple_form:install --bootstrap

# Answer Yes to the question about overwriting your existing `config/initializers/simple_form.rb`
```

This generates an initializer and scaffold files for Rails view scaffolding.

Add Bootstrap imports to the top your `application.scss`

```css
// application.scss
@import "~bootstrap/scss/_functions";
@import "~bootstrap/scss/_variables";

...
```

Now you've got Bootstrap in the application.

We include `simple_form` in the project by default. For more information about using Bootstrap styling
on `simple_form` forms, check out the documentation here http://simple-form-bootstrap.plataformatec.com.br/documentation

# Fire up the app and open it in a browser
$ heroku local
$ open http://localhost:3000

## Using a Custom Project Template

Expand Down
3 changes: 3 additions & 0 deletions lib/raygun/raygun.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ def print_next_steps_carbon_five
puts "$".colorize(:blue) + " heroku local".colorize(:light_blue)
puts "$".colorize(:blue) + " open http://localhost:3000".colorize(:light_blue)
puts ""
puts "# For some suggested next steps, check out the raygun README".colorize(:light_green)
puts "$".colorize(:blue) + " open https://github.com/carbonfive/raygun/#next-steps".colorize(:light_blue)
puts ""
puts "Enjoy your Carbon Five flavored Rails application!".colorize(:yellow)
end

Expand Down

0 comments on commit 03c07eb

Please sign in to comment.