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
 
@@ -1,3 +1,3 @@
1
1
  module Jplugin
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jplugin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: