diff --git a/lib/compass/exec.rb b/lib/compass/exec.rb index d37f766b..b4a1fdf7 100644 --- a/lib/compass/exec.rb +++ b/lib/compass/exec.rb @@ -101,6 +101,19 @@ END self.options[:quiet] = true end + opts.on('-f FRAMEWORK', '--framework FRAMEWORK', 'Use the specified framework.') do |framework| + self.options[:framework] = framework + end + + opts.on('-p', '--pattern PATTERN', 'Stamp out a pattern into the current project. Must be used in combination with -f.') do |pattern| + self.options[:command] = :stamp_pattern + self.options[:pattern] = pattern + end + + opts.on('-n', '--pattern-name NAME', 'The name to use when stamping a pattern. Must be used in combination with -p.') do |name| + self.options[:pattern_name] = name + end + opts.on('--sass-dir SRC_DIR', "The source directory where you keep your sass stylesheets.") do |sass_dir| self.options[:sass_dir] = sass_dir end @@ -117,10 +130,6 @@ END self.options[:command] = :write_configuration end - opts.on('-f FRAMEWORK', '--framework FRAMEWORK', 'Set up a new project using the specified framework.') do |framework| - self.options[:framework] = framework - 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 @@ -159,19 +168,10 @@ END exit end - opts.on('--validate', :NONE, 'Validate your project\'s compiled css') do + opts.on('--validate', :NONE, 'Validate your project\'s compiled css. Requires Java.') do self.options[:command] = :validate_project end - opts.on('-p', '--pattern PATTERN', 'Stamp out a pattern into the current project. Must be used in combination with -f.') do |pattern| - self.options[:command] = :stamp_pattern - self.options[:pattern] = pattern - end - - opts.on('-n', '--pattern-name NAME', 'The name to use when stamping a pattern. Must be used in combination with -p.') do |name| - self.options[:pattern_name] = name - end - opts.on_tail("-?", "-h", "--help", "Show this message") do puts opts exit