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

compile.rb « dummy_sass_only « test - github.com/twbs/bootstrap-sass.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6253af119d535f55565f714f0a6ed41e6fa6fbc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 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