Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Version bump to 0.0.0

  • Loading branch information...
commit 79898817f903156dd5e2e8498a5a5cc402731f34 1 parent ffb30b5
Pelle Braendgaard pelle authored
1  VERSION
... ... @@ -0,0 +1 @@
  1 +0.0.0
53 lib/guard/guard-jammit.rb
... ... @@ -0,0 +1,53 @@
  1 +require 'guard'
  2 +require 'guard/guard'
  3 +
  4 +module Guard
  5 + class GuardJammit < Guard
  6 +
  7 + def initialize(watchers = [], options = {})
  8 + super
  9 + # init stuff here, thx!
  10 + end
  11 +
  12 + # ================
  13 + # = Guard method =
  14 + # ================
  15 +
  16 + # If one of those methods raise an exception, the Guard instance
  17 + # will be removed from the active guard.
  18 +
  19 + # Call once when guard starts
  20 + # Please override initialize method to init stuff
  21 + def start
  22 + jammit
  23 + end
  24 +
  25 + # Call with Ctrl-C signal (when Guard quit)
  26 + def stop
  27 + true
  28 + end
  29 +
  30 + # Call with Ctrl-Z signal
  31 + # This method should be mainly used for "reload" (really!) actions like reloading passenger/spork/bundler/...
  32 + def reload
  33 + jammit
  34 + end
  35 +
  36 + # Call with Ctrl-/ signal
  37 + # This method should be principally used for long action like running all specs/tests/...
  38 + def run_all
  39 + jammit
  40 + end
  41 +
  42 + # Call on file(s) modifications
  43 + def run_on_change(paths)
  44 + jammit
  45 + end
  46 +
  47 + def jammit
  48 + Jammit.packager.precache_all
  49 + true
  50 + end
  51 +
  52 + end
  53 +end
4 lib/guard/guard-jammit/templates/Guardfile
... ... @@ -0,0 +1,4 @@
  1 +guard 'jammit' do
  2 + watch('^public/javascripts/(.*)\.js')
  3 + watch('^public/stylesheets/(.*)\.css')
  4 +end

0 comments on commit 7989881

Please sign in to comment.
Something went wrong with that request. Please try again.