Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 45 lines (38 sloc) 0.902 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
require "bundler/setup"

task :default => :watch

desc "Publish \"marketing\" docs"
task :publish do
  sh("git rebase master gh-pages")
  sh("git checkout master")
  sh("git push origin master")
  sh("git push origin gh-pages")
  sh("git push --tags")
end

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
Something went wrong with that request. Please try again.