forked from jasmine/jasmine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
33 lines (25 loc) · 728 Bytes
/
Rakefile
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
require "bundler"
Bundler::GemHelper.install_tasks
require "term/ansicolor"
require "json"
require "tilt"
Dir["#{File.dirname(__FILE__)}/tasks/**/*.rb"].each do |file|
require file
end
task :default => :spec
task :require_pages_submodule do
raise "Submodule for Github Pages isn't present. Run git submodule update --init" unless pages_submodule_present
end
task :require_node do
raise "\nNode.js is required to develop code for Jasmine. Please visit http://nodejs.org to install.\n\n" unless node_installed?
end
def pages_submodule_present
File.exist?('pages/download.html')
end
def node_installed?
`which node` =~ /node/
end
class String
include Term::ANSIColor
end
Term::ANSIColor.coloring = STDOUT.isatty