Socket
Book a DemoInstallSign in
Socket

capistrano-bundle

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capistrano-bundle

0.0.5
bundlerRubygems
Version published
Maintainers
1
Created
Source

Capistrano Bundle

A fast and simple asset bundling extension for Capistrano 3.x

Modular Asset Capability

A common requirement is to split your css / js into modules organised by folder, so for instance you may have a setup like this:

public/
  stylesheets/
    resets/
      fonts.css
      typography.css
      main.css
    core/
      headers.css
      colors.css
      navigation.css
    blog/
      styles.css
    news/
      styles.css

This capistrano bundle deployer, splits your assets up into modules based on the top-level directory, giving you combined builds of each. The above setup would yield the following build files:

public/
  stylesheets/
    build/
      resets_combined.css
      core_combined.css
      blog_combined.css
      news_combined.css

A similar principle works for Javascript assest too.

Defaults and configuring

You'll need to add the gem to your Gemfile.

gem 'capistrano-bundle'

Then add this to your Capfle:

require 'capistrano/bundle'

The defaults are configure the above behaviour, but are completely customisable.

set :bundle_build_path, fetch(:deploy_to)
set :bundle_dirs, [
    ["public/stylesheets/*/", "**/*.css", "public/stylesheets/build/"],
    ["public/javascripts/*/", "**/*.js",  "public/javascripts/build/"]
]
set :bundle_build_suffix, "_combined"

Contributing

This is a very early example of the functionality quite a few features and options are so-far unavailable. If there's something you'd lke to see open an issue.

FAQs

Package last updated on 03 Apr 2014

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.