[Command Line] Add a sub command for emitting sass CLI imports
This commit is contained in:
parent
211e99c90c
commit
cc08b1e5de
@ -7,6 +7,11 @@ layout: article
|
|||||||
COMPASS CHANGELOG
|
COMPASS CHANGELOG
|
||||||
=================
|
=================
|
||||||
|
|
||||||
|
0.10.1 (May 13, 2010)
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
* Added a subcommand for emitting sass imports for the sass CLI.
|
||||||
|
|
||||||
0.10.0 (May 10, 2010)
|
0.10.0 (May 10, 2010)
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ end
|
|||||||
require 'compass/commands/registry'
|
require 'compass/commands/registry'
|
||||||
|
|
||||||
%w(base generate_grid_background help list_frameworks project_base
|
%w(base generate_grid_background help list_frameworks project_base
|
||||||
update_project watch_project create_project installer_command
|
update_project watch_project create_project imports installer_command
|
||||||
print_version project_stats stamp_pattern validate_project
|
print_version project_stats stamp_pattern validate_project
|
||||||
write_configuration interactive).each do |lib|
|
write_configuration interactive).each do |lib|
|
||||||
require "compass/commands/#{lib}"
|
require "compass/commands/#{lib}"
|
||||||
|
29
lib/compass/commands/imports.rb
Normal file
29
lib/compass/commands/imports.rb
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
module Compass
|
||||||
|
module Commands
|
||||||
|
class Imports < ProjectBase
|
||||||
|
attr_accessor :options
|
||||||
|
register :imports
|
||||||
|
def initialize(working_path, options)
|
||||||
|
super
|
||||||
|
end
|
||||||
|
|
||||||
|
def execute
|
||||||
|
print ::Compass::Frameworks::ALL.map{|f|
|
||||||
|
"-I #{f.stylesheets_directory}"
|
||||||
|
}.join(' ')
|
||||||
|
end
|
||||||
|
class << self
|
||||||
|
def description(command)
|
||||||
|
"Emit an imports suitable for passing to the sass command-line."
|
||||||
|
end
|
||||||
|
def parse!(arguments)
|
||||||
|
if arguments.join("").strip.size > 0
|
||||||
|
raise OptionParser::ParseError, "This command takes no options or arguments."
|
||||||
|
else
|
||||||
|
{}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user