Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-sass.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Mazovetskiy <glex.spb@gmail.com>2013-10-24 20:48:16 +0400
committerGleb Mazovetskiy <glex.spb@gmail.com>2013-10-24 20:48:16 +0400
commit2cdb154a47cd5afbb157a4d11f7e5a7124818cdc (patch)
tree9d9baae249ef61c507c1326caf4cec5eb4b67e9f /templates
parente551ce0a8f3df19ebbac3fe053d4c2ba72d76a22 (diff)
refs #451 inject bs_variables_path
Diffstat (limited to 'templates')
-rw-r--r--templates/project/_variables.scss.erb5
-rw-r--r--templates/project/manifest.rb4
2 files changed, 4 insertions, 5 deletions
diff --git a/templates/project/_variables.scss.erb b/templates/project/_variables.scss.erb
index 37f8bf75..6fdcf38a 100644
--- a/templates/project/_variables.scss.erb
+++ b/templates/project/_variables.scss.erb
@@ -1,6 +1,3 @@
<% require 'bootstrap-sass/version' %>
// Override Bootstrap variables here (defaults copied from bootstrap-sass version <%= Bootstrap::VERSION %>):
-<%=
- scss = File.read('vendor/assets/stylesheets/bootstrap/_variables.scss')
- scss.gsub(/^(?=\$)/, '//').gsub(/ !default/, '')
-%> \ No newline at end of file
+<%= File.read(@template[:options][:bs_variables_path]).gsub(/^(?=\$)/, '//').gsub(/ !default/, '') %> \ No newline at end of file
diff --git a/templates/project/manifest.rb b/templates/project/manifest.rb
index 33c3b547..3ed98752 100644
--- a/templates/project/manifest.rb
+++ b/templates/project/manifest.rb
@@ -4,7 +4,9 @@ description 'Bootstrap for Sass'
stylesheet 'styles.scss'
# SCSS:
-stylesheet '_variables.scss.erb', to: '_variables.scss', erb: true
+bs_stylesheets = "../../vendor/assets/stylesheets/bootstrap"
+stylesheet '_variables.scss.erb', to: '_variables.scss', erb: true,
+ bs_variables_path: File.expand_path("#{bs_stylesheets}/_variables.scss", File.dirname(__FILE__))
# JS:
bs_javascripts = "../../vendor/assets/javascripts/bootstrap"