-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
33 lines (26 loc) · 837 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
require 'rubygems'
require 'rake'
require 'fileutils'
require "bundler/gem_tasks"
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/*_test.rb'
test.verbose = false
end
task :default => :test
def copy_js(source, destination)
destination ||= '.'
FileUtils.cp File.join(File.dirname(__FILE__), 'javascripts', source), destination
puts "wrote #{source} to #{destination}"
end
namespace :giggly do
desc "writes out the giggly-socialize.js api wrapper in the given directory. ex) rake giggly:js IN=path/to/write (IN defaults to the current directory)"
task :js do
copy_js 'giggly-socialize.js', ENV['IN']
end
desc "writes out the minified version of giggly-socialize"
task :"js:min" do
copy_js 'giggly-socialize-min.js', ENV['IN']
end
end