1
0
Fork 0
mirror of https://github.com/twbs/bootstrap-sass.git synced 2022-11-09 12:27:02 -05:00
twbs--bootstrap-sass/test/dummy_sass_only/compile.rb
Gleb Mazovetskiy a1c5ec516b sass -> sassc
Fixes #1156
2018-12-14 12:16:04 +00:00

20 lines
383 B
Ruby

# frozen_string_literal: true
require 'sassc'
require 'bootstrap-sass'
require 'fileutils'
load_path = ARGV[0]
out_path = ARGV[1]
output = SassC::Engine.new(
File.read(File.expand_path('./import_all.scss', __dir__)),
syntax: :scss, load_paths: [load_path]
).render
if out_path
FileUtils.mkdir_p(File.dirname(out_path))
File.write(out_path, output)
else
puts output
end