jplugin 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,13 +1,16 @@
|
|
1
|
-
|
1
|
+
/** @preserve
|
2
2
|
* <%= name %>
|
3
3
|
*
|
4
4
|
* Created at: <%= Time.now %>
|
5
|
+
* Updated at: <%= Time.now %>
|
6
|
+
*
|
5
7
|
* Author: <%= author %>
|
6
8
|
* Version: 0.0.0
|
9
|
+
*
|
7
10
|
*/
|
8
11
|
|
9
12
|
/*global jQuery:false*/
|
10
13
|
|
11
14
|
(function($) {
|
12
15
|
"use strict";
|
13
|
-
}(jQuery));
|
16
|
+
}(jQuery));
|
@@ -4,6 +4,9 @@ class Jplugin < Thor
|
|
4
4
|
desc "compile", "Compiles js file to public/"
|
5
5
|
def compile
|
6
6
|
relative = '<%= name %>.js'
|
7
|
+
text = File.read(relative)
|
8
|
+
text.gsub!(/Updated at: (.*)/) { |m| m.gsub($1, "#{Time.now}") }
|
9
|
+
File.open( relative, "w") { |file| file.puts text }
|
7
10
|
run( "closure-compiler --js #{relative} --js_output_file ./public/#{relative.gsub(".js","-min.js")}" )
|
8
11
|
end
|
9
12
|
|
data/lib/jplugin/version.rb
CHANGED