Permalink
Browse files

Add a task to update the javascripts, stylesheets, and images.

  • Loading branch information...
1 parent d226468 commit 8885a1cb69939b0bf54d1b554da17f6c18fccb45 @brianjlandau committed Mar 9, 2008
Showing with 17 additions and 0 deletions.
  1. +17 −0 tasks/datepicker_tasks.rake
@@ -0,0 +1,17 @@
+namespace :datepicker do
+ require 'fileutils'
+
+ desc "Replace the old javascript and CSS files with the new ones"
+ task :update do
+ js_dir = File.dirname(__FILE__) + '/../../../../public/javascripts/'
+ datepicker_js = js_dir + 'datepicker.js'
+ lang_dir = js_dir + 'lang'
+ datepicker_css = File.dirname(__FILE__) + '/../../../../public/stylesheets/datepicker.css'
+ images_dir = File.dirname(__FILE__) + '/../../../../public/images/datepicker'
+
+ FileUtils.cp File.dirname(__FILE__) + '/../public/javascripts/datepicker.js', datepicker_js
+ FileUtils.cp_r File.dirname(__FILE__) + '/../public/javascripts/lang/', lang_dir
+ FileUtils.cp File.dirname(__FILE__) + '/../public/stylesheets/datepicker.css', datepicker_css
+ FileUtils.cp_r File.dirname(__FILE__) + '/../public/images/', images_dir
+ end
+end

0 comments on commit 8885a1c

Please sign in to comment.