# File lib/compass/commands/clean_project.rb, line 54 def primary; true; end
# File lib/compass/commands/clean_project.rb, line 56 def description(command) "Remove generated files and the sass cache" end
# File lib/compass/commands/clean_project.rb, line 25 def initialize(working_path, options) super assert_project_directory_exists! end
# File lib/compass/commands/clean_project.rb, line 43 def option_parser(arguments) parser = Compass::Exec::CommandOptionParser.new(arguments) parser.extend(Compass::Exec::GlobalOptionsParser) parser.extend(Compass::Exec::ProjectOptionsParser) parser.extend(CleanProjectOptionsParser) end
# File lib/compass/commands/clean_project.rb, line 60 def parse!(arguments) parser = option_parser(arguments) parser.parse! parse_arguments!(parser, arguments) parser.options end
# File lib/compass/commands/clean_project.rb, line 67 def parse_arguments!(parser, arguments) if arguments.size > 0 parser.options[:project_name] = arguments.shift if File.directory?(arguments.first) unless arguments.empty? parser.options[:sass_files] = arguments.dup parser.options[:force] = true end end end
# File lib/compass/commands/clean_project.rb, line 54 def primary; true; end
# File lib/compass/commands/clean_project.rb, line 50 def usage option_parser([]).to_s end
# File lib/compass/commands/clean_project.rb, line 38 def determine_cache_location Compass.configuration.cache_path || Sass::Plugin.options[:cache_location] || File.join(working_path, ".sass-cache") end
# File lib/compass/commands/clean_project.rb, line 30 def perform compiler = new_compiler_instance compiler.clean! Compass::SpriteImporter.find_all_sprite_map_files(Compass.configuration.images_path).each do |sprite| remove sprite end end