Permalink
Browse files

* adding a rake task to minify javascript

* adding prettyprint class in the code tag
  • Loading branch information...
1 parent c37ab66 commit a0530b76967ec52d9ce47516774ba8e4209a397d @ananthakumaran committed Mar 23, 2010
Showing with 108 additions and 4 deletions.
  1. BIN build/compiler.jar
  2. +1 −1 jquery.wmd.js
  3. +100 −0 jquery.wmd.min.js
  4. +5 −1 rakefile.rb
  5. +1 −1 showdown.js
  6. +1 −1 wmd-test.html
View
Binary file not shown.
View
@@ -3328,7 +3328,7 @@ var _DoCodeSpans = function(text) {
c = c.replace(/^([ \t]*)/g,""); // leading whitespace
c = c.replace(/[ \t]*$/g,""); // trailing whitespace
c = _EncodeCode(c);
- return m1+"<code>"+c+"</code>";
+ return m1+"<code class='prettyprint'>"+c+"</code>";
});
return text;
View
Oops, something went wrong.
View
@@ -1,5 +1,5 @@
-task :default => [:concat]
+task :default => [:minify]
task :concat do
f = File.new('jquery.wmd.js','w')
@@ -8,3 +8,7 @@
end
f.close
end
+
+task :minify => [:concat] do
+ system("java -jar build/compiler.jar --js jquery.wmd.js --js_output_file jquery.wmd.min.js")
+end
View
@@ -959,7 +959,7 @@ var _DoCodeSpans = function(text) {
c = c.replace(/^([ \t]*)/g,""); // leading whitespace
c = c.replace(/[ \t]*$/g,""); // trailing whitespace
c = _EncodeCode(c);
- return m1+"<code>"+c+"</code>";
+ return m1+"<code class='prettyprint'>"+c+"</code>";
});
return text;
View
@@ -7,7 +7,7 @@
<link rel="stylesheet" type="text/css" href="wmd.css" />
<script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="jquery.wmd.js"></script>
+ <script type="text/javascript" src="jquery.wmd.min.js"></script>
</head>
<body>

0 comments on commit a0530b7

Please sign in to comment.