Browse Source

Replaces application.css with application.scss

Jason Charnes 7 years ago
parent
commit
14221dd3a6
2 changed files with 7 additions and 9 deletions
  1. 4 0
      app/assets/stylesheets/application.scss
  2. 3 9
      template.rb

+ 4 - 0
app/assets/stylesheets/application.scss

@@ -0,0 +1,4 @@
+@import "bootstrap-sprockets";
+@import "bootstrap";
+
+// Examples...

+ 3 - 9
template.rb

@@ -5,7 +5,6 @@ end
 def add_users
   # Gemfile
   gem 'devise', '~> 4.2.1'
-  gem 'bootstrap-sass', '~> 3.3.6'
 
   # Install Devise
   rails_command "generate devise:install"
@@ -26,15 +25,10 @@ def add_users
 end
 
 def add_bootstrap
-  # Rename Application SCSS
-  run "mv app/assets/stylesheets/application.css app/assets/stylesheets/application.scss"
+  gem 'bootstrap-sass', '~> 3.3.6'
 
-  # Insert Bootstrap Styling
-  insert_into_file(
-    "app/assets/stylesheets/application.scss",
-    "@import 'bootstrap-sprockets';\n@import 'bootstrap'\n",
-    after: " */\n"
-  )
+  # Replace Application SCSS
+  run "rm app/assets/stylesheets/application.css"
 end
 
 def copy_templates