cyborg 0.5.13 → 0.5.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2d1dc919350c58e8dba2e60bef24090a5bfb07e
|
4
|
+
data.tar.gz: 4b1c0545b4ab96eedf7b55806f947111352a701f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2fcb930d1a8b88ea653523519a3eea3e4fc09b0e95845699207688772b8ff47f41f7211f1598d9c4e3d7bdb172473b55463df7559aa6848a5c104454ff50ee6
|
7
|
+
data.tar.gz: 09e5f45fb099313c0f5bd48d1acfccc2fbfd1ff613b0e27d73d63cc2deb6593e7f851b2f6b261bb1dd8051e88c2869499b5c18a31616818ce745d7ef7b50ff6b
|
data/lib/cyborg.rb
CHANGED
@@ -40,8 +40,22 @@ module Cyborg
|
|
40
40
|
File.basename(path).sub(/(\.\w+)$/, '-'+plugin.version+'\1')
|
41
41
|
end
|
42
42
|
|
43
|
-
def
|
44
|
-
"Built: #{destination(file).sub(plugin.root+'/','')}"
|
43
|
+
def build_success(file)
|
44
|
+
log_success "Built: #{destination(file).sub(plugin.root+'/','')}"
|
45
|
+
end
|
46
|
+
|
47
|
+
def build_failure(file)
|
48
|
+
msg = "FAILED TO BUILD"
|
49
|
+
msg += ": #{destination(file).sub(plugin.root+'/','')}" if file
|
50
|
+
log_error msg
|
51
|
+
end
|
52
|
+
|
53
|
+
def log_success( msg )
|
54
|
+
STDOUT.print msg.to_s.strip.colorize(:green)
|
55
|
+
end
|
56
|
+
|
57
|
+
def log_error( msg )
|
58
|
+
STDERR.puts msg.to_s.strip.colorize(:red)
|
45
59
|
end
|
46
60
|
|
47
61
|
# Determine if an NPM module is installed by checking paths with `npm ls`
|
@@ -124,7 +138,6 @@ module Cyborg
|
|
124
138
|
|
125
139
|
File.utime(mtime, mtime, gz_file)
|
126
140
|
end
|
127
|
-
|
128
141
|
end
|
129
142
|
end
|
130
143
|
end
|
@@ -19,20 +19,20 @@ module Cyborg
|
|
19
19
|
|
20
20
|
if Open3.capture3("npm ls browserify-incremental")[1].empty?
|
21
21
|
files.each do |file|
|
22
|
-
|
22
|
+
begin
|
23
|
+
system build_command(file)
|
24
|
+
compress(destination(file)) if Cyborg.production?
|
23
25
|
|
24
|
-
|
25
|
-
compress(destination(file))
|
26
|
-
end
|
26
|
+
puts build_success(file)
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
puts "FAILED TO WRITE: #{file}."
|
28
|
+
rescue => bang
|
29
|
+
build_failure file
|
30
|
+
log_error bang
|
32
31
|
end
|
33
32
|
end
|
34
33
|
else
|
35
|
-
|
34
|
+
log_error "JS BUILD FAILED: browserifyinc NPM module not found.\n" << "Please add browserifyinc to your package.json and run `npm install`"
|
35
|
+
abort
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
@@ -26,10 +26,10 @@ module Cyborg
|
|
26
26
|
build_sass(file)
|
27
27
|
end
|
28
28
|
|
29
|
-
puts
|
30
|
-
rescue
|
31
|
-
|
32
|
-
|
29
|
+
puts build_success(file)
|
30
|
+
rescue => bang
|
31
|
+
build_failure file
|
32
|
+
log_error bang
|
33
33
|
end
|
34
34
|
end
|
35
35
|
end
|
@@ -29,12 +29,17 @@ module Cyborg
|
|
29
29
|
def build
|
30
30
|
return if find_files.empty?
|
31
31
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
32
|
+
begin
|
33
|
+
@svg.read_files
|
34
|
+
|
35
|
+
if file = @svg.write
|
36
|
+
puts build_success(file)
|
37
|
+
else
|
38
|
+
log_error "FAILED TO BUILD SVGs"
|
39
|
+
end
|
40
|
+
rescue => bang
|
41
|
+
log_error "FAILED TO BUILD SVGs"
|
42
|
+
log_error bang
|
38
43
|
end
|
39
44
|
end
|
40
45
|
end
|
data/lib/cyborg/version.rb
CHANGED