0
@@ -9,7 +9,7 @@ require 'rubygems'
0
+require 'colored'
unless PLATFORM =~ /win32/ && !Gem.available?('win32console')0
@@ -18,7 +18,7 @@ require 'front_end_architect/hash'
0
module FrontEndArchitect
0
FILTER_REGEX = /filter: ?[^?]+\(src=(['"])([^\?'"]+)(\?(?:[^'"]+)?)?\1,[^?]+\1\);/im
0
IMPORT_REGEX = /@import(?: url\(| )(['"]?)([^\?'"\)\s]+)(\?(?:[^'"\)]+)?)?\1\)?(?:[^?;]+)?;/im
0
@@ -30,6 +30,7 @@ module FrontEndArchitect
0
:root => File.dirname(:blendfile.to_s),
0
+ :colored => (Object.const_defined? :Colored),
0
@@ -82,12 +83,12 @@ module FrontEndArchitect
0
if File.writable?(output_name) && !(@options[:gzip] && !File.writable?(gzip_output_name))
0
create_output(output_name, sources, file_type)
0
- puts 'Permission Denied:'.white_on_red + ' ' + output_name.red
0
- puts 'Permission Denied:'.white_on_red + ' ' + gzip_output_name.red if @options[:gzip]
0
+ puts_colored 'Permission Denied:' + ' ' + output_name, :red
0
+ puts_colored 'Permission Denied:' + ' ' + gzip_output_name, :red if @options[:gzip]
0
- puts 'Skipping: '.yellow + output_name.yellow
0
- puts 'Skipping: '.yellow + gzip_output_name.yellow if @options[:gzip]
0
+ puts_colored 'Skipping: ' + output_name, :yellow
0
+ puts_colored 'Skipping: ' + gzip_output_name, :yellow if @options[:gzip]
0
create_output(output_name, sources, file_type)
0
@@ -136,6 +137,14 @@ module FrontEndArchitect
0
+ def puts_colored(output, color)
0
+ puts Colored.colorize(output, { :foreground => color })
0
def flatten_blendfile(value, key=nil, context=[])
0
context << key unless key.nil?
0
@@ -225,7 +234,7 @@ module FrontEndArchitect
0
- puts
output_name.green
0
+ puts
_colored output_name, :green
0
output_gzip = output_name + '.gz'
0
@@ -234,12 +243,12 @@ module FrontEndArchitect
0
- puts
output_gzip.green
0
+ puts
_colored output_gzip, :green
0
def process_css(input_file, output_path)
0
- # TODO Move this to a seperate class and clean it up A LOT. For
1.10
+ # TODO Move this to a seperate class and clean it up A LOT. For
2.00
# Determine full path of input file
0
input_path = Pathname.new(File.dirname(input_file))