File: compile.rb

package info (click to toggle)
node-bootstrap-sass 3.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,492 kB
  • sloc: javascript: 3,526; ruby: 1,249; sh: 5; makefile: 3
file content (20 lines) | stat: -rw-r--r-- 388 bytes parent folder | download | duplicates (3)
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