Module: BowerRails

Extended by:
BowerRails
Included in:
BowerRails
Defined in:
lib/bower-rails.rb,
lib/bower-rails/dsl.rb,
lib/bower-rails/railtie.rb,
lib/bower-rails/version.rb,
lib/bower-rails/performer.rb,
lib/generators/bower_rails/initialize/initialize_generator.rb

Defined Under Namespace

Modules: Generators Classes: Dsl, Performer, Railtie

Constant Summary collapse

VERSION =
"0.12.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.bower_components_directoryObject

Where to store the bower components



43
44
45
# File 'lib/bower-rails.rb', line 43

def bower_components_directory
  @bower_components_directory
end

.clean_before_precompileObject

If set to true then rake bower:install && rake bower:clean tasks are invoked before assets precompilation



23
24
25
# File 'lib/bower-rails.rb', line 23

def clean_before_precompile
  @clean_before_precompile
end

.exclude_from_cleanObject

If containing a list of bower component names, those components will be excluded from the bower:clean



27
28
29
# File 'lib/bower-rails.rb', line 27

def exclude_from_clean
  @exclude_from_clean
end

.force_installObject

If set to true then rake bower:install will be invoked instead of rake bower:install before assets precompilation



40
41
42
# File 'lib/bower-rails.rb', line 40

def force_install
  @force_install
end

.install_before_precompileObject

If set to true then rake bower:install task is invoked before assets precompilation



15
16
17
# File 'lib/bower-rails.rb', line 15

def install_before_precompile
  @install_before_precompile
end

.resolve_before_precompileObject

If set to true then rake bower:install && rake bower:resolve tasks are invoked before assets precompilation



19
20
21
# File 'lib/bower-rails.rb', line 19

def resolve_before_precompile
  @resolve_before_precompile
end

.root_pathObject

The root path of the project



9
10
11
# File 'lib/bower-rails.rb', line 9

def root_path
  @root_path
end

.tasksObject (readonly)

An array of tasks to enhance rake assets:precompile



12
13
14
# File 'lib/bower-rails.rb', line 12

def tasks
  @tasks
end

.use_bower_install_deploymentObject

If set to true then rake bower:install:deployment will be invoked instead of rake bower:install before assets precompilation



31
32
33
# File 'lib/bower-rails.rb', line 31

def use_bower_install_deployment
  @use_bower_install_deployment
end

.use_gem_deps_for_bowerfileObject

If set to true then rake bower:install will search for gem dependencies and in each gem it will search for Bowerfile and then concatenate all Bowerfile for evaluation



36
37
38
# File 'lib/bower-rails.rb', line 36

def use_gem_deps_for_bowerfile
  @use_gem_deps_for_bowerfile
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (BowerRails)

    the object that the method was called on



45
46
47
48
# File 'lib/bower-rails.rb', line 45

def configure &block
  yield self if block_given?
  collect_tasks
end