blob: e8037b9df7762607f97691d0c5a1ca0c6e6ddf16 [file] [log] [blame]
Erich Smith55e77de2012-05-11 23:27:03 -04001# The install directory is hard-coded. TODO: allow the directory to be specified on the command line.
2
3cite about-plugin
Erich Smith08e439c2012-05-13 08:37:31 -04004about-plugin 'download jquery files into current project'
Robert R Evansc9da0862010-10-06 17:27:55 -07005
Travis Swicegooda694d2d2011-05-29 15:25:26 -05006[[ -z "$JQUERY_VERSION_NUMBER" ]] && JQUERY_VERSION_NUMBER="1.6.1"
7[[ -z "$JQUERY_UI_VERSION_NUMBER" ]] && JQUERY_UI_VERSION_NUMBER="1.8.13"
Robert R Evansa4d02422010-10-02 15:07:29 -07008
9function rails_jquery {
Erich Smith55e77de2012-05-11 23:27:03 -040010 about 'download rails.js into public/javascripts'
Erich Smith08e439c2012-05-13 08:37:31 -040011 group 'javascript'
Erich Smith55e77de2012-05-11 23:27:03 -040012
Robert R Evansa4d02422010-10-02 15:07:29 -070013 curl -o public/javascripts/rails.js http://github.com/rails/jquery-ujs/raw/master/src/rails.js
14}
15
16function jquery_install {
Erich Smith55e77de2012-05-11 23:27:03 -040017 about 'download jquery.js into public/javascripts'
Erich Smitha825c5f2012-05-15 14:25:42 -040018 group 'javascript'
Erich Smith55e77de2012-05-11 23:27:03 -040019
Travis Swicegooda694d2d2011-05-29 15:25:26 -050020 if [ -z "$1" ]
21 then
22 version=$JQUERY_VERSION_NUMBER
23 else
24 version="$1"
25 fi
26 curl -o public/javascripts/jquery.js "http://ajax.googleapis.com/ajax/libs/jquery/$version/jquery.min.js"
Robert R Evansa4d02422010-10-02 15:07:29 -070027}
28
Travis Swicegooda694d2d2011-05-29 15:25:26 -050029function jquery_ui_install {
Erich Smith55e77de2012-05-11 23:27:03 -040030 about 'download jquery_us.js into public/javascripts'
Erich Smitha825c5f2012-05-15 14:25:42 -040031 group 'javascript'
Erich Smith55e77de2012-05-11 23:27:03 -040032
Travis Swicegooda694d2d2011-05-29 15:25:26 -050033 if [ -z "$1" ]
34 then
35 version=$JQUERY_UI_VERSION_NUMBER
36 else
37 version="$1"
38 fi
39
40 curl -o public/javascripts/jquery_ui.js "http://ajax.googleapis.com/ajax/libs/jqueryui/$version/jquery-ui.min.js"
41}