From ba677ad5d29bc40ab5dadb879aaacf53aa97fa0a Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sun, 18 Mar 2012 14:15:31 -0700 Subject: [PATCH] Add a -I option to the global options so that you can add sass import paths via the CLI. Closes #375. --- lib/compass/exec/global_options_parser.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/compass/exec/global_options_parser.rb b/lib/compass/exec/global_options_parser.rb index 0f52225b..911dc9fe 100644 --- a/lib/compass/exec/global_options_parser.rb +++ b/lib/compass/exec/global_options_parser.rb @@ -26,6 +26,13 @@ module Compass::Exec::GlobalOptionsParser ::Compass.configuration.discover Pathname.new(frameworks_dir).realpath end + opts.on('-I IMPORT_PATH', + "Makes files under the IMPORT_PATH folder findable by Sass's @import directive." + ) do |import_path| + require 'pathname' + ::Compass.configuration.add_import_path Pathname.new(import_path).realpath + end + opts.on('-q', '--quiet', :NONE, 'Quiet mode.') do self.options[:quiet] = true end