Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bowerinstaller

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bowerinstaller

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Bowerinstaller

rake task to install bower packages to rails. This project is inspired by bower, bower-installer, and bower-rails. The rake task uses bower to manage the package dependencies and download the required bower packages.
Then it follows the mechanism similar to bower-installer to install js/css to the proper location. Once that is done, it will then generate a component.js and component.css file to require all the installed js/css file.
component.js/css can then be included by application.js/css.

Requirement

  • node (on github)
  • bower installed with npm

Install

Add this line to your application's Gemfile:

gem 'bowerinstaller'

bower.rb

Instead of using bower.json, bowerinstaller uses a DSL approach, similar to Gemfile. bower.rb must be created in your Rails application's root directory. Here is an example:

group :vendor do  # install package under vendor folder
  package :jquery, "1.8" do # require jquery, version 1.8
    do_not_install  # tell bowerinstall only download jquery for dependency check, we use do_not_install to tell bower that we will include jquery ourselves
  end
  package :handlebars, "1.0.0-rc.3" do
    source 'handlebars.js' # we want to install handlebars.js only.
  end
  package :datatables, "1.9.4" # we do not explicitly say what source to install.  This will install the files as specified in package's package.json's main attribute
end

The other support group is :lib.

Available command

rake bower:install    # install bower packages
rake bower:unindstall # uninstall bower packages

Note

After you run bower:install, the required js/css will be installed under /vendor/assets/components folder. It will also generate /app/assets/javascripts/components.js and /app/assets/stylesheets/components.js. You can explicitly require these two files in your application.js and application.css. This will ensure any vendor packages you add in the future will be automatically included into your app.

FAQs

Package last updated on 06 May 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc