No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
There are separate Ruby gems to access Bootstrap and Font Awesome in your Rails application, but they can be annoying when it comes time to deploy or when you want to look at the source code. These rake tasks actually move the source code into your application, so you have full control. The rake tasks also make it easy to add Start Bootstrap themes to your site, which can be a pain.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
>= 0
~> 10.0
>= 0

Runtime

= 2.0.0
= 0.0.5
 Project Readme

FrontendGenerators

This gem can be used to easily set up a Start Bootstrap theme in your Rails application. The Start Bootstrap code has fully been modified to follow Rails conventions (Rails partials are awesome!).

The FrontendGenerators gem also lets you easily copy the Bootstrap & Font Awesome css, js, and fonts directly into your application. Most people use twitter-bootstrap-rails and font-awesome-rails to access these frontend libraries in their code, but I find it much easier to just have the code in my own applications. It's easier to examine the source code when it's in your application and you can avoid frusterating Rails asset pipeline bugs with this straightforward setup. Annoying bugs are what motivated me to create this gem in the first place.

This video shows how to use the gem.

Installation

Add this line to your application's Gemfile:

gem 'frontend-generators'

And then execute:

$ bundle

Update your Rakefile with this code:

require "frontend_generators"
load 'tasks/add_assets.rake'

Bootstrap

To move the Bootstrap files into your Rails application, run this rake task:

bundle exec rake add_assets:bootstrap

Go to application.css and add this line:

*= require bootstrap

Go to application.js and add this line:

//= require bootstrap

The fonts are in the /public/fonts/ directory because Rails keeps changing where the fonts should be and it is annoying to keep up with all the changes.

Font-Awesome

To move the Font-Awesome files into your Rails application, run this rake task:

bundle exec rake add_assets:font_awesome

Go to application.css and add this line:

*= require font_awesome

To move the Start Bootstrap Stylish Portfolio theme into your Rails application, run this rake task:

bundle exec rake add_assets:stylish_portfolio

Add the route to routes.rb:

get 'stylish_portfolios/index'

Add this line to config/initializers/assets.rb:

Rails.application.config.assets.precompile += %w( stylish_portfolio/manifest.css stylish_portfolio/manifest.js )

To move the Start Bootstrap Creative theme into your Rails application, run this rake task:

bundle exec rake add_assets:creative

Add the route to routes.rb:

get 'creatives/index'

Add this line to config/initializers/assets.rb:

Rails.application.config.assets.precompile += %w( creative/manifest.js creative/manifest.css )

To move the Start Bootstrap Freelancer theme into your Rails application, run this rake task:

bundle exec rake add_assets:freelancer

Add the route to routes.rb:

get 'freelancers/index'

Add this line to config/initializers/assets.rb:

Rails.application.config.assets.precompile += %w( freelancer/manifest.js freelancer/manifest.css )

To move the Start Bootstrap Clean Blog theme into your Rails application, run this rake task:

bundle exec rake add_assets:clean_blog

Add the routes to routes.rb:

root 'clean_blogs#index'
get  'about' 	=> 'clean_blogs#about'
get  'post' 	=> 'clean_blogs#post'
get  'contact' 	=> 'clean_blogs#contact'

Remove this line from app/assets/stylsheets/application.css:

*= require bootstrap

To move the Start Bootstrap Grayscale theme into your Rails application, run this rake task:

bundle exec rake add_assets:grayscale

Add the route to routes.rb:

get 'grayscales/index'

Add this line to config/initializers/assets.rb:

Rails.application.config.assets.precompile += %w( grayscale/manifest.js grayscale/manifest.css )

To move the Start Bootstrap New Age theme into your Rails application, run this rake task:

bundle exec rake add_assets:new_age

Add the route to routes.rb:

get 'new_ages/index'

Add this line to config/initializers/assets.rb:

Rails.application.config.assets.precompile += %w( new_age/manifest.js new_age/manifest.css )

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/MrPowers/frontend-generators.

License

The gem is available as open source under the terms of the MIT License.