Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Build in jQuery-Lint

  • Loading branch information...
commit 4dc81d31e4ea987feaa3801e2b50d4b790dd5b29 1 parent 4b77dfa
Mike Gunderloy authored
3  README.textile
View
@@ -100,7 +100,8 @@ h3. Testing Tools
* More extra shoulda macros: @should_have_before_filter@, @should_have_after_filter@, @should_protect_from_forgery@, @should_have_helper_method@
* "metric-fu":http://metric-fu.rubyforge.org/ for static code analysis. rake metrics:all, configure in Rakefile
* "inaction-mailer":http://github.com/cwninja/inaction_mailer/tree/master is installed for development environment, so mails sent during dev will end up as files in /tmp/sent_mails. @rake mail:clear@ will clean out this directory. Alternatively, you can configure the template to use "MockSMTP":http://mocksmtpapp.com/ in development mode.
-* "test-unit 2.0":http://test-unit.rubyforge.org/test-unit/ for nicer output.
+* "test-unit 2.0":http://test-unit.rubyforge.org/test-unit/ for nicer output.
+* "jQuery-Lint":http://github.com/jamespadolsey/jQuery-Lint to keep your jQuery squeaky clean.
h3. Miscellaneous
3  patterns/default/app/views/layouts/application.html.erb
View
@@ -6,7 +6,8 @@
<title><%= h(yield(:title) || controller.action_name) %></title>
<%= raw include_stylesheets :common, :media => 'all' %>
<%= raw include_stylesheets :print, :media => 'print' %>
- <%= raw include_javascripts :common %>
+ <%= raw include_javascripts :common %>
+ #{jquery_lint_tag}
<!--[if IE]>
<%= raw include_stylesheets :ie, :media => 'screen, projection' %>
<![endif]-->
1  patterns/default/doc/README_FOR_APP
View
@@ -94,3 +94,4 @@ Testing Tools
- time-warp for forcing time in tests (use pretend_now_is)
- test_benchmark to identify slow tests (in test environment only)
- query-trace to locate source of queries in the log (development only - turn on via config/initializers/query_trace.rb)
+#{'- jQuery-Lint to keep your jQuery squeaky-clean' if javascript_library == 'jquery'}
3  snippets/jquery/jquery_lint_tag
View
@@ -0,0 +1,3 @@
+ <% if Rails.env.development? %>
+ <%= javascript_include_tag "jquery.lint.js" %>
+ <% end %>
10 templates/lark/main.rb
View
@@ -117,7 +117,11 @@
file 'app/views/layouts/_flashes.html.erb', load_pattern('app/views/layouts/_flashes.html.erb', 'default', binding)
footer_class = load_snippet('footer_class', design)
-
+
+jquery_lint_tag = ''
+if javascript_library == 'jquery'
+ jquery_lint_tag = load_snippet('jquery_lint_tag', 'jquery')
+end
file 'app/views/layouts/application.html.erb', load_pattern('app/views/layouts/application.html.erb', 'default', binding)
# rakefile for use with inaction_mailer
@@ -195,7 +199,9 @@
download('http://jqueryui.com/download/jquery-ui-1.7.2.custom.zip', 'public/javascripts/jquery-ui-1.7.2.custom.zip')
# there's got to be an easier way...
system('cd public/javascripts/ && unzip jquery-ui-1.7.2.custom.zip development-bundle/ui/jquery-ui-1.7.2.custom.js && mv development-bundle/ui/jquery-ui-1.7.2.custom.js jquery-ui-1.7.2.custom.js && rm jquery-ui-1.7.2.custom.zip && rm -Rf development-bundle && cd ../.. ')
-
+
+ file_from_repo "jamespadolsey", "jQuery-Lint", "master", "jquery.lint.js", "public/javascripts/jquery.lint.js"
+
commit_state "added jQuery"
end
Please sign in to comment.
Something went wrong with that request. Please try again.