The resources task is executed by the compile task to copy resource files over to the target directory. You can enhance this task in the normal way, but mostly you will use the task’s filter.
For example:
resources.filter.using 'Copyright'=>'Acme Inc, 2007'
Returns the filter used to copy resources over. See Buildr::Filter.
Excludes the specified files in the filter and returns self.
# File lib/buildr/core/compile.rb, line 454 def exclude(*files) filter.exclude *files self end
Adds additional directories from which to copy resources.
For example:
resources.from _('src/etc')
# File lib/buildr/core/compile.rb, line 466 def from(*sources) filter.from *sources self end
Includes the specified files in the filter and returns self.
# File lib/buildr/core/compile.rb, line 445 def include(*files) filter.include *files self end
Returns the list of source directories (each being a file task).
# File lib/buildr/core/compile.rb, line 472 def sources filter.sources end
Returns the filter’s target directory as a file task.
# File lib/buildr/core/compile.rb, line 480 def target filter.into @project.path_to(:target, @usage, :resources) unless filter.target || sources.empty? filter.target end