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>2018-08-22 00:34:39 +0300
committerGleb Mazovetskiy <glex.spb@gmail.com>2018-12-14 15:16:04 +0300
commita1c5ec516b5352f70ba93b704d36ecd8e284eabd (patch)
tree794bb70f440910b6f6b10c72f40e5bc359f6e5a3 /Rakefile
parent3db610a768032bcabdaffc83bf0f343558fc9958 (diff)
sass -> sassc
Fixes #1156
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile18
1 files changed, 10 insertions, 8 deletions
diff --git a/Rakefile b/Rakefile
index 3e88526d..ae42c2e2 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,4 +1,4 @@
-lib_path = File.join(File.dirname(__FILE__), 'lib')
+lib_path = File.join(__dir__, 'lib')
$:.unshift(lib_path) unless $:.include?(lib_path)
load './tasks/bower.rake'
@@ -42,11 +42,12 @@ end
desc 'Dumps output to a CSS file for testing'
task :debug do
- require 'sass'
+ require 'sassc'
+ require 'bootstrap-sass'
path = Bootstrap.stylesheets_path
- %w(bootstrap).each do |file|
- engine = Sass::Engine.for_file("#{path}/#{file}.scss", syntax: :scss, load_paths: [path])
- File.open("./#{file}.css", 'w') { |f| f.write(engine.render) }
+ %w(_bootstrap).each do |file|
+ engine = SassC::Engine.new(File.read("#{path}/#{file}.scss"), syntax: :scss, load_paths: [path])
+ File.open("tmp/#{file}.css", 'w') { |f| f.write(engine.render) }
end
end
@@ -64,7 +65,8 @@ end
desc 'Compile bootstrap-sass to tmp/ (or first arg)'
task :compile, :css_path do |t, args|
- require 'sass'
+ require 'sassc'
+ require 'bootstrap-sass'
require 'term/ansicolor'
path = 'assets/stylesheets'
@@ -74,8 +76,8 @@ task :compile, :css_path do |t, args|
%w(_bootstrap bootstrap/_theme).each do |file|
save_path = "#{css_path}/#{file.sub(/(^|\/)?_+/, '\1').sub('/', '-')}.css"
puts Term::ANSIColor.cyan(" #{save_path}") + '...'
- engine = Sass::Engine.for_file("#{path}/#{file}.scss", syntax: :scss, load_paths: [path])
- css = engine.render
+ engine = SassC::Engine.new(File.read("#{path}/#{file}.scss"), syntax: :scss, load_paths: [path])
+ css = engine.render
File.open(save_path, 'w') { |f| f.write css }
end
end