forked from jashkenas/backbone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
24 lines (21 loc) · 830 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
desc "rebuild the backbone-min.js files for distribution"
task :build do
check 'uglifyjs', 'UglifyJS', 'https://github.com/mishoo/UglifyJS2'
system 'uglifyjs backbone.js --mangle --source-map backbone-min.map -o backbone-min.js'
end
desc "build the docco documentation"
task :doc do
check 'docco', 'docco', 'https://github.com/jashkenas/docco'
system 'docco backbone.js && docco examples/todos/todos.js examples/backbone.localstorage.js'
end
desc "run JavaScriptLint on the source"
task :lint do
check 'jsl', 'JavaScript Lint', 'http://www.javascriptlint.com/'
system "jsl -nofilelisting -nologo -conf docs/jsl.conf -process backbone.js"
end
# Check for the existence of an executable.
def check(exec, name, url)
return unless `which #{exec}`.empty?
puts "#{name} not found.\nInstall it from #{url}"
exit
end