mirror of
https://github.com/scratchfoundation/jquery-timeago.git
synced 2024-11-23 07:47:54 -05:00
Updated rake tasks to automatically compile CoffeeScript
* Introduced bundler (for fssm)
This commit is contained in:
parent
f6e569306f
commit
467827843b
5 changed files with 48 additions and 4 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
.bundle
|
||||
vendor/ruby
|
3
Gemfile
Normal file
3
Gemfile
Normal file
|
@ -0,0 +1,3 @@
|
|||
source "http://rubygems.org"
|
||||
|
||||
gem "fssm", "0.2.0"
|
10
Gemfile.lock
Normal file
10
Gemfile.lock
Normal file
|
@ -0,0 +1,10 @@
|
|||
GEM
|
||||
remote: http://rubygems.org/
|
||||
specs:
|
||||
fssm (0.2.0)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
fssm (= 0.2.0)
|
37
Rakefile
37
Rakefile
|
@ -1,8 +1,8 @@
|
|||
verbose(true)
|
||||
require "bundler/setup"
|
||||
|
||||
task :default => :test
|
||||
task :default => :watch
|
||||
|
||||
desc 'Publish "marketing" docs'
|
||||
desc "Publish "marketing" docs"
|
||||
task :publish do
|
||||
sh("git rebase master gh-pages")
|
||||
sh("git checkout master")
|
||||
|
@ -11,7 +11,36 @@ task :publish do
|
|||
sh("git push --tags")
|
||||
end
|
||||
|
||||
desc 'Open your default browser with the test page'
|
||||
desc "Build everything"
|
||||
task :build do
|
||||
rebuild_coffee
|
||||
end
|
||||
|
||||
desc "Watch for changes and test the site"
|
||||
task :watch => :build do
|
||||
sh("open test/index.html")
|
||||
monitor
|
||||
end
|
||||
|
||||
desc "Open your default browser with the test page"
|
||||
task :test do
|
||||
sh("open test/index.html")
|
||||
end
|
||||
|
||||
def rebuild_coffee(base = nil, relative = "**/*.coffee")
|
||||
sh("coffee -c #{relative}")
|
||||
end
|
||||
|
||||
def monitor
|
||||
require "fssm"
|
||||
puts ">>> Monitoring for changes. Press Ctrl-C to Stop."
|
||||
FSSM.monitor do
|
||||
path "." do
|
||||
glob "**/*.coffee"
|
||||
update &method(:rebuild_coffee)
|
||||
delete &method(:rebuild_coffee)
|
||||
create &method(:rebuild_coffee)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
BIN
vendor/cache/fssm-0.2.0.gem
vendored
Normal file
BIN
vendor/cache/fssm-0.2.0.gem
vendored
Normal file
Binary file not shown.
Loading…
Reference in a new issue