module BowerRails
Constants
- VERSION
Attributes
bower_components_directory[RW]
Where to store the bower components
clean_before_precompile[RW]
If set to true then rake bower:install && rake bower:clean tasks are invoked before assets precompilation
exclude_from_clean[RW]
If containing a list of bower component names, those components will be excluded from the bower:clean
force_install[RW]
If set to true then rake bower:install will be invoked instead of rake bower:install before assets precompilation
install_before_precompile[RW]
If set to true then rake bower:install task is invoked before assets precompilation
resolve_before_precompile[RW]
If set to true then rake bower:install && rake bower:resolve tasks are invoked before assets precompilation
root_path[RW]
The root path of the project
tasks[R]
An array of tasks to enhance `rake assets:precompile`
use_bower_install_deployment[RW]
If set to true then rake bower:install:deployment will be invoked instead of rake bower:install before assets precompilation
Public Class Methods
configure() { |self| ... }
click to toggle source
# File lib/bower-rails.rb, line 45 def configure &block yield self if block_given? collect_tasks end
Private Class Methods
collect_tasks()
click to toggle source
# File lib/bower-rails.rb, line 52 def collect_tasks install_cmd = 'bower:install' install_cmd = 'bower:install:deployment' if @use_bower_install_deployment install_cmd += '[-F]' if @force_install @tasks << [install_cmd] if @install_before_precompile @tasks << [install_cmd, 'bower:clean'] if @clean_before_precompile @tasks << [install_cmd, 'bower:resolve'] if @resolve_before_precompile @tasks.flatten! @tasks.uniq! end