File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
generators/critical_path_css Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ module CriticalPathCss
2+ module Rails
3+ class Engine < ::Rails ::Engine
4+ end
5+ end
6+ end
Original file line number Diff line number Diff line change 1+ require 'rails/generators'
2+
3+ module CriticalPathCss
4+ class InstallGenerator < Rails ::Generators ::Base
5+ source_root File . expand_path ( '..' , __FILE__ )
6+
7+ # Copy all needed stylesheets in the asset directory of the application
8+ def copy_stylesheets
9+ FileUtils . mkdir_p "app/assets/stylesheets/bootstrap_overrides"
10+
11+ copy_file "../../../app/assets/stylesheets/twitter/bootstrap.css.scss" , "app/assets/stylesheets/bootstrap_overrides/base.css.scss"
12+ copy_file "../../../app/assets/stylesheets/twitter/bootstrap/_variables.scss" , "app/assets/stylesheets/bootstrap_overrides/variables.css.scss"
13+ copy_file "templates/bootstrap_overrides.css.scss" , "app/assets/stylesheets/bootstrap_overrides/bootstrap_overrides.css.scss"
14+ end
15+ end
16+ end
You can’t perform that action at this time.
0 commit comments