Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 31 lines (26 sloc) 0.813 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
require 'rubygems'

desc 'build js files'
task :build do
  begin
    require 'coffee-script'
  rescue LoadError
    puts "coffee-script not found.\nInstall it by running 'gem install coffee-script'"
    exit
  end

  system 'coffee -c backbone.analytics.coffee'
  system 'coffee -c spec/backbone.analytics_spec.coffee'

  # TODO: create minified version too
end

desc 'build docs for gh-pages'
task :build_docs do
  begin
    require 'rocco'
  rescue LoadError
    puts "rocco not found.\nInstall it by running 'gem install rocco'"
    exit
  end

  system 'git checkout gh-pages && git merge master'
  system 'rocco backbone.analytics.coffee && mv backbone.analytics.html index.html'
  system 'git add index.html && git commit -m "update gh-pages" && git push origin gh-pages'
  system 'git checkout master'
end
Something went wrong with that request. Please try again.