Skip to content

Instantly share code, notes, and snippets.

@foxyblocks
Created January 7, 2020 01:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foxyblocks/20844ea013f324ac57652e199ce82574 to your computer and use it in GitHub Desktop.
Save foxyblocks/20844ea013f324ac57652e199ce82574 to your computer and use it in GitHub Desktop.
## Given a glob pattern and a base directory expands that into a list of sass @import statements for files in that directory
glob = ARGV[0]
basedir = ARGV[0]
Dir.chdir(basedir) do
Dir[glob].each do |f|
puts "@import '#{f.gsub(/.scss$/, '')}';"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment