... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
0 @@ -13,17 +13,18 @@ require 'front_end_architect/blender' 0 opts = OptionParser.new do |opts| 0 - opts.on('-h', '--help', "Show this message") { puts opts; exit 0 } 0 - opts.on('-V', '--version', "Show the version number") { puts "Front-End Blender v#{Blender::VERSION}"; exit 0 } 0 - opts.on('-g', '--generate', String, "Generate a stub Blendfile") { options[:generate] = true } 0 - opts.on('-f FILE', '--file FILE', String, "Use given Blendfile") {|f| options[:blendfile] = f } 0 - opts.on('-r ROOT', '--root ROOT', String, "Set the path to the web root directory") {|r| options[:root] = r } 0 - opts.on('-t TYPE', '--type TYPE', [:css, :js], "Select file type to blend (css, js)") {|t| options[:file_type] = t } 0 - opts.on('-c [BUSTER]', '--cache-buster [BUSTER]', String, "Append cache busters to URLs in CSS, defaults to timestamps") {|b| options[:cache_buster] = b.nil? ? :mtime : b } 0 - opts.on( '--force', String, "Force blending when source files aren't newer than output files") { options[:force] = true } 0 - opts.on( '--yui=YUIOPTS', String, "Pass arguments to YUI Compressor") {|o| options[:yuiopts] = o } 0 - opts.on('-d', '--data', String, "EXPERIMENTAL Convert url(file.ext) to url(data:) in CSS files") { options[:data] = true } 0 - opts.on('-z', '--gzip', String, "EXPERIMENTAL Also create gzip output files") { options[:gzip] = true } 0 + opts.on('-h', '--help', "Show this message") { puts opts; exit 0 } 0 + opts.on('-V', '--version', "Show the version number") { puts "Front-End Blender v#{Blender::VERSION}"; exit 0 } 0 + opts.on('-g', '--generate', String, "Generate a stub Blendfile") { options[:generate] = true } 0 + opts.on('-f FILE', '--file FILE', String, "Use given Blendfile") {|f| options[:blendfile] = f } 0 + opts.on('-r ROOT', '--root ROOT', String, "Set the path to the web root directory") {|r| options[:root] = r } 0 + opts.on('-t TYPE', '--type TYPE', [:css, :js], "Select file type to blend (css, js)") {|t| options[:file_type] = t } 0 + opts.on('-m MINIFIER', '--min MINIFIER', [:yui, :none], "Select minifier to use (yui, none), default is YUI") {|m| options[:min] = m.to_sym } 0 + opts.on('-c [BUSTER]', '--cache-buster [BUSTER]', String, "Append cache busters to URLs in CSS, defaults to timestamps") {|b| options[:cache_buster] = b.nil? ? :mtime : b } 0 + opts.on( '--force', String, "Force blending when source files aren't newer than output files") { options[:force] = true } 0 + opts.on( '--yui=YUIOPTS', String, "Pass arguments to YUI Compressor") {|o| options[:yuiopts] = o } 0 + opts.on('-d', '--data', String, "EXPERIMENTAL Convert url(file.ext) to url(data:) in CSS files") { options[:data] = true } 0 + opts.on('-z', '--gzip', String, "EXPERIMENTAL Also create gzip output files") { options[:gzip] = true } 0 opts.parse!(ARGV) rescue return false
|