lib/bower-rails.rb in bower-rails-0.7.2 vs lib/bower-rails.rb in bower-rails-0.7.3
- old
+ new
@@ -5,10 +5,13 @@
extend self
class << self
# An array of tasks to enhance `rake assets:precompile`
attr_reader :tasks
+
+ # If set to true then rake bower:install task is invoked before assets precompilation
+ attr_accessor :install_before_precompile
# If set to true then rake bower:install && rake bower:resolve tasks
# are invoked before assets precompilation
attr_accessor :resolve_before_precompile
@@ -22,10 +25,11 @@
end
private
def collect_tasks
+ @tasks << ['bower:install'] if @install_before_precompile
@tasks << ['bower:install', 'bower:resolve'] if @resolve_before_precompile
@tasks << ['bower:install', 'bower:clean'] if @clean_before_precompile
@tasks.flatten!
@tasks.uniq!
end
@@ -33,8 +37,9 @@
# By default tasks are empty
@tasks = []
# Set default values for options
+ @install_before_precompile = false
@resolve_before_precompile = false
- @clean_before_precompile = false
+ @clean_before_precompile = false
end
\ No newline at end of file