public
Rubygem
Description: Blender is like ant or make for the front-end. It aggregates and compresses CSS and/or JavaScript assets for a site into efficient, production-ready files.
Homepage: http://front-end-architect.lighthouseapp.com/projects/11475-blender/overview
Clone URL: git://github.com/front-end/front-end-blender.git
Listed --root earlier in the usage output.
cgriego (author)
Sun Jun 08 19:39:59 -0700 2008
commit  bff6bd7a619be3a91f60143852214247bf1dfd84
tree    e567ef699913fbe68e8bad3d8869fa94fac78845
parent  84cdd72dfed2b453b613906e0a4f9c63e68a93a6
...
39
40
41
 
42
43
44
45
46
47
...
39
40
41
42
43
44
 
45
46
47
0
@@ -39,9 +39,9 @@ source files are the hash values as an array. Here is a sample Blendfile:
0
     -V, --version Prints Blender's version number
0
     -g, --generate Generate a stub Blendfile
0
     -f, --file FILE Use given Blendfile
0
+ -r, --root ROOT Specify the path to the web root directory
0
     -t, --type TYPE Select file type to blend (css, js)
0
     -c, --cache-buster [BUSTER] Append cache busters to URLs in CSS, defaults to timestamps
0
- -r, --root ROOT Specify the path to the web root directory
0
         --force Force blending when source files aren't newer than output files
0
         --yui=YUIOPTS Pass arguments to YUI Compressor
0
     -d, --data EXPERIMENTAL Convert url(file.ext) to url(data:) in CSS files
...
17
18
19
 
20
21
22
23
24
25
...
17
18
19
20
21
22
 
23
24
25
0
@@ -17,9 +17,9 @@ opts = OptionParser.new do |opts|
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('-r ROOT', '--root ROOT', String, "Set the path to the web root directory") {|r| options[:root] = r }
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 }
...
247
248
249
250
 
251
252
253
...
286
287
288
 
289
290
291
...
322
323
324
 
325
326
327
328
329
 
330
331
332
 
333
334
335
...
247
248
249
 
250
251
252
253
...
286
287
288
289
290
291
292
...
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
0
@@ -247,7 +247,7 @@ module FrontEndArchitect
0
       input = input.gsub(IMPORT_REGEX) do |import|
0
         uri = $2
0
         asset_path = Pathname.new(File.expand_path(uri, input_path))
0
-
0
+
0
         if uri.match(/^(\/[^\/]+.+)$/)
0
           asset_path = Pathname.new(File.join(File.expand_path(@options[:root]), uri))
0
         end
0
@@ -286,6 +286,7 @@ module FrontEndArchitect
0
               if uri.match(/^(\/[^\/]+.+)$/)
0
                 new_path = Pathname.new(File.join(File.expand_path(@options[:root]), uri))
0
               end
0
+
0
               %Q!url(#{new_path})!
0
             else
0
               %Q!url(#{$2}#{$3})!
0
@@ -322,14 +323,17 @@ module FrontEndArchitect
0
             if @options[:data]
0
               # if doing data conversion rewrite url as an absolute path.
0
               new_path = File.expand_path(uri, File.dirname(input_file))
0
+
0
               if uri.match(/^(\/[^\/]+.+)$/)
0
                 new_path = Pathname.new(File.join(File.expand_path(@options[:root]), uri))
0
               end
0
             else
0
               asset_path = Pathname.new(File.expand_path(uri, File.dirname(input_file)))
0
+
0
               if uri.match(/^(\/[^\/]+.+)$/)
0
                 asset_path = Pathname.new(File.join(File.expand_path(@options[:root]), uri))
0
               end
0
+
0
               new_path = asset_path.relative_path_from(output_path)
0
               
0
               if @options[:cache_buster]

Comments

    No one has commented yet.