guard-uglify 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/guard/uglify.rb +25 -8
- data/lib/guard/uglify/templates/Guardfile +1 -1
- data/lib/guard/uglify/version.rb +2 -2
- metadata +42 -47
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 323c7e2132478df1476a90090aff3fe5bbbbab1c
|
4
|
+
data.tar.gz: a1aee90b3034c4cb5dd65ab171c7ec9ad8906d34
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: af5d8c254070611af0884295b3c9461d6e47ec3699a0166c2c9921a35ecb05a40adeec874bf6c1211e1d21b3c12d540b5466485b34bb129a6cb69656f934f56d
|
7
|
+
data.tar.gz: 4d5a7690e7618689b0025a09116fad46f0bf7c8024893fab2f4ee52973fe8d0a2b238db08adfcb947693a7bda08e1b196d2d026f601398157c2981627db63a9b
|
data/lib/guard/uglify.rb
CHANGED
@@ -7,22 +7,39 @@ module Guard
|
|
7
7
|
class Uglify < Guard
|
8
8
|
def initialize(watchers=[], options={})
|
9
9
|
super
|
10
|
-
@
|
10
|
+
@input = options[:input]
|
11
|
+
@output = options[:output]
|
11
12
|
end
|
12
13
|
|
13
14
|
def start
|
14
|
-
|
15
|
+
uglify
|
15
16
|
end
|
16
|
-
|
17
|
+
|
18
|
+
def reload
|
19
|
+
uglify
|
20
|
+
end
|
21
|
+
|
17
22
|
def run_all
|
18
|
-
|
23
|
+
uglify
|
19
24
|
end
|
20
25
|
|
21
26
|
def run_on_change(paths)
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
27
|
+
uglify
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
def uglify
|
32
|
+
begin
|
33
|
+
uglified = Uglifier.new.compile(File.read(@input))
|
34
|
+
File.open(@output,'w'){ |f| f.write(uglified) }
|
35
|
+
UI.info "Uglified #{@input} to #{@output}"
|
36
|
+
Notifier.notify "Uglified #{@input} to #{@output}", :title => 'Uglify'
|
37
|
+
true
|
38
|
+
rescue Exception => e
|
39
|
+
UI.error "Uglifying #{@input} failed: #{e}"
|
40
|
+
Notifier.notify "Uglifying #{@input} failed: #{e}", :title => 'Uglify', :image => :failed
|
41
|
+
false
|
42
|
+
end
|
26
43
|
end
|
27
44
|
end
|
28
45
|
end
|
data/lib/guard/uglify/version.rb
CHANGED
metadata
CHANGED
@@ -1,79 +1,74 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-uglify
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 0.1.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
6
5
|
platform: ruby
|
7
|
-
authors:
|
6
|
+
authors:
|
8
7
|
- Aaron Cruz
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2014-06-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
16
14
|
name: guard
|
17
|
-
|
18
|
-
|
19
|
-
none: false
|
20
|
-
requirements:
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
21
17
|
- - ">="
|
22
|
-
- !ruby/object:Gem::Version
|
18
|
+
- !ruby/object:Gem::Version
|
23
19
|
version: 0.2.2
|
24
20
|
type: :runtime
|
25
|
-
version_requirements: *id001
|
26
|
-
- !ruby/object:Gem::Dependency
|
27
|
-
name: uglifier
|
28
21
|
prerelease: false
|
29
|
-
|
30
|
-
|
31
|
-
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.2.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: uglifier
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
32
31
|
- - ">="
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version:
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
35
34
|
type: :runtime
|
36
|
-
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
37
41
|
description: guard file for the uglifier gem
|
38
|
-
email:
|
42
|
+
email:
|
39
43
|
- aaron@aaroncruz.com
|
40
44
|
executables: []
|
41
|
-
|
42
45
|
extensions: []
|
43
|
-
|
44
46
|
extra_rdoc_files: []
|
45
|
-
|
46
|
-
|
47
|
+
files:
|
48
|
+
- lib/guard/uglify.rb
|
47
49
|
- lib/guard/uglify/templates/Guardfile
|
48
50
|
- lib/guard/uglify/version.rb
|
49
|
-
- lib/guard/uglify.rb
|
50
51
|
homepage: http://aaroncruz.com
|
51
52
|
licenses: []
|
52
|
-
|
53
|
+
metadata: {}
|
53
54
|
post_install_message:
|
54
55
|
rdoc_options: []
|
55
|
-
|
56
|
-
require_paths:
|
56
|
+
require_paths:
|
57
57
|
- lib
|
58
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
59
|
-
|
60
|
-
requirements:
|
58
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
61
60
|
- - ">="
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version:
|
64
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
|
-
|
66
|
-
requirements:
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
67
65
|
- - ">="
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version:
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
70
68
|
requirements: []
|
71
|
-
|
72
69
|
rubyforge_project: guard-uglify
|
73
|
-
rubygems_version:
|
70
|
+
rubygems_version: 2.2.2
|
74
71
|
signing_key:
|
75
|
-
specification_version:
|
72
|
+
specification_version: 4
|
76
73
|
summary: guard file for the uglifier gem
|
77
74
|
test_files: []
|
78
|
-
|
79
|
-
has_rdoc:
|