From e93051d239fbed48e05fbabcb80df6d21744cff1 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Thu, 1 Jan 2009 23:11:52 -0800 Subject: [PATCH] Add a command to list available frameworks. --- lib/compass/commands/list_frameworks.rb | 16 ++++++++++++++++ lib/compass/exec.rb | 4 ++++ 2 files changed, 20 insertions(+) create mode 100644 lib/compass/commands/list_frameworks.rb diff --git a/lib/compass/commands/list_frameworks.rb b/lib/compass/commands/list_frameworks.rb new file mode 100644 index 00000000..dd8bbbe5 --- /dev/null +++ b/lib/compass/commands/list_frameworks.rb @@ -0,0 +1,16 @@ +module Compass + module Commands + class ListFrameworks + attr_accessor :options + def initialize(working_directory, options) + self.options = options + end + + def perform + Compass::Frameworks::ALL.each do |framework| + puts framework.name + end + end + end + end +end \ No newline at end of file diff --git a/lib/compass/exec.rb b/lib/compass/exec.rb index da78a0af..464713e6 100644 --- a/lib/compass/exec.rb +++ b/lib/compass/exec.rb @@ -108,6 +108,10 @@ END self.options[:framework] = framework end + opts.on('--list-frameworks', "List compass frameworks available to use.") do + self.options[:command] = :list_frameworks + end + opts.on('-e ENV', '--environment ENV', [:development, :production], 'Use sensible defaults for your current environment: development, production (default)') do |env| self.options[:environment] = env end