add back guard for @svenfuchs
This commit is contained in:
parent
2d12a1e6a2
commit
651dbd366d
7
Guardfile
Normal file
7
Guardfile
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
$: << 'lib'
|
||||||
|
|
||||||
|
guard 'assets' do
|
||||||
|
watch(%r(^Assetfile))
|
||||||
|
watch(%r(^assets))
|
||||||
|
end
|
||||||
|
|
6
Guardfile.phantom
Normal file
6
Guardfile.phantom
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
$: << 'lib'
|
||||||
|
|
||||||
|
guard 'specs' do
|
||||||
|
watch(%r(^public))
|
||||||
|
end
|
||||||
|
|
41
lib/guard/assets.rb
Normal file
41
lib/guard/assets.rb
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
$stdout.sync = true
|
||||||
|
|
||||||
|
require 'guard'
|
||||||
|
require 'guard/guard'
|
||||||
|
require 'rake-pipeline'
|
||||||
|
|
||||||
|
module Guard
|
||||||
|
class Assets < Guard
|
||||||
|
def start
|
||||||
|
UI.info "Guard::Assets is running."
|
||||||
|
run
|
||||||
|
end
|
||||||
|
|
||||||
|
def run_all
|
||||||
|
run
|
||||||
|
end
|
||||||
|
|
||||||
|
def reload
|
||||||
|
run
|
||||||
|
end
|
||||||
|
|
||||||
|
def run_on_change(paths)
|
||||||
|
puts "change: #{paths.inspect}"
|
||||||
|
run
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def run
|
||||||
|
started = Time.now
|
||||||
|
print 'Compiling ... '
|
||||||
|
project.invoke_clean
|
||||||
|
puts "done (#{(Time.now - started).round(2)}s)."
|
||||||
|
end
|
||||||
|
|
||||||
|
def project
|
||||||
|
@project ||= Rake::Pipeline::Project.new('./Assetfile')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
35
lib/guard/specs.rb
Normal file
35
lib/guard/specs.rb
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
$stdout.sync = true
|
||||||
|
|
||||||
|
require 'guard'
|
||||||
|
require 'guard/guard'
|
||||||
|
|
||||||
|
module Guard
|
||||||
|
class Specs < Guard
|
||||||
|
def start
|
||||||
|
UI.info "Guard::Specs is running."
|
||||||
|
run
|
||||||
|
end
|
||||||
|
|
||||||
|
def run_all
|
||||||
|
run
|
||||||
|
end
|
||||||
|
|
||||||
|
def reload
|
||||||
|
run
|
||||||
|
end
|
||||||
|
|
||||||
|
def run_on_change(paths)
|
||||||
|
puts "change: #{paths.inspect}"
|
||||||
|
run
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def run
|
||||||
|
system './run_jasmine.coffee public/spec.html'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user