Sha256: 10d2aecf2a69c434c1a3f59b06e1c684a84755f6ba00540d9a98222421f9fff9

Contents?: true

Size: 1.04 KB

Versions: 18

Compression:

Stored size: 1.04 KB

Contents

gem 'jammit'

after_bundler do
  if config['pre_commit']
    say_wizard "Adding git pre-commit hook to compile assets..."
    create_file ".git/hooks/pre-commit", <<-BASH
#!/bin/sh

echo "Packaging assets with Jammit..."
jammit
git add public/assets
BASH
    run "chmod +x .git/hooks/pre-commit"
  end

  create_file "config/assets.yml", <<-YAML
javascripts:
  app:
    - public/javascripts/*.js
stylesheets:
  app:
    - public/stylesheets/*.css
YAML

  gsub_file "app/views/layouts/application.html.erb", "<%= javascript_include_tag :defaults %>", "<%= include_javascripts :app %>"
  gsub_file "app/views/layouts/application.html.erb", "<%= stylesheet_link_tag :all %>", "<%= include_stylesheets :app %>"
end

__END__

name: Jammit
description: "Use Jammit to package your application's assets."
author: mbleigh
# http://documentcloud.github.com/jammit/

exclusive: asset_packaging
category: assets
tags: [assets, asset_packaging, packaging]

config:
  - pre_commit:
      type: boolean
      prompt: "Create a git pre-commit hook to locally generate assets?"

Version data entries

18 entries across 18 versions & 3 rubygems

Version Path
appscrolls-0.11.2 scrolls/untested/jammit.rb
appscrolls-0.11.1 scrolls/untested/jammit.rb
appscrolls-0.11.0 scrolls/untested/jammit.rb
appscrolls-0.10.1 scrolls/untested/jammit.rb
appscrolls-0.10.0 scrolls/untested/jammit.rb
appscrolls-0.9.0 scrolls/untested/jammit.rb
appscrolls-0.8.4 scrolls/zzz/jammit.rb
appscrolls-0.8.3 scrolls/zzz/jammit.rb
appscrolls-0.8.2 scrolls/zzz/jammit.rb
appscrolls-0.8.1 scrolls/zzz/jammit.rb
appscrolls-0.8.0 scrolls/zzz/jammit.rb
appscrolls-0.7.1 scrolls/zzz/jammit.rb
appscrolls-0.7.0 scrolls/zzz/jammit.rb
eldarscrolls-0.7.0 scrolls/zzz/jammit.rb
ey_rails_wizard-0.6.0 scrolls/zzz/jammit.rb
ey_rails_wizard-0.5.0 scrolls/jammit.rb
ey_rails_wizard-0.4.0 scrolls/jammit.rb
ey_rails_wizard-0.3.1 recipes/jammit.rb