Sha256: bbe815bc345819b08b7db5733e6b101abffb82c3c550cf435bc25b3411e07cd0

Contents?: true

Size: 1.46 KB

Versions: 6

Compression:

Stored size: 1.46 KB

Contents

# Incomplete
module AppDrone
class Bootstrap < Drone
  desc "Installs Twitter Bootstrap stylesheets and javascripts"
  category :ui

  #param :vendor, :boolean, info: 'place a local copy of the files into the repo for customization'

  param :responsive, :boolean, info: 'include responsive grid'
  param :font_awesome, :boolean, info: 'use font-awesome for icons', default: true
  param :javascript_plugins, :choose_many, info: 'pipeline javascript plugin files', default: [], choices: %w(modal dropdown scrollspy tab tooltip popover alert button collapse carousel typeahead)

  depends_on :bundle, :stylesheet, :javascript
  pairs_with :flair

  def align
    bundle.add 'compass_twitter_bootstrap', git: 'git://github.com/vwall/compass-twitter-bootstrap.git', group: :assets
    param(:vendor) ? align_vendor : align_bundle
    flair!
  end

  def execute
    param(:vendor) ? execute_vendor : execute_bundle
  end

 private
  def align_vendor
    # TODO import paths for stylesheet (different to bundle)
    param(:javascript_plugins).each { |p| javascript.pipeline "bootstrap-#{p}" }
  end

  def align_bundle
    stylesheet.import param(:font_awesome) ? 'compass_twitter_bootstrap_awesome' : 'compass_twitter_bootstrap'
    stylesheet.import 'compass_twitter_bootstrap_responsive' if param(:responsive)
    param(:javascript_plugins).each { |p| javascript.pipeline "bootstrap-#{p}" }
  end

  def execute_vendor
    # TODO pull files from git
  end

  def execute_bundle
  end

end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
app_drone-0.8.5 lib/app_drone/drones/bootstrap/bootstrap.rb
app_drone-0.8.4alpha lib/app_drone/drones/bootstrap/bootstrap.rb
app_drone-0.8.3 lib/app_drone/drones/bootstrap/bootstrap.rb
app_drone-0.8.2 lib/app_drone/drones/bootstrap/bootstrap.rb
app_drone-0.8.1 lib/app_drone/drones/bootstrap/bootstrap.rb
app_drone-0.8.0 lib/app_drone/drones/bootstrap/bootstrap.rb