cyborg 0.5.19 → 0.5.20
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 +4 -4
- data/lib/cyborg/plugin/assets/javascripts.rb +2 -7
- data/lib/cyborg/plugin/assets/svgs.rb +11 -2
- data/lib/cyborg/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18932df829227244205d712f5f24606b960dbfc3
|
4
|
+
data.tar.gz: 00bf1a7894c7d4b08172b0f5760cb72ac1e1923c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6083983b7e9ec63be59d8e06dfe3f91e5845c6bbc6722077564eb4a39038c2af00553b2b9e6dc0fa0cbf6f33da7487119c65fb1b2b14ca90fae4c62f2cd5c7f3
|
7
|
+
data.tar.gz: 236f2ef3845d780006b286c4920cbda5f48e1a436b7d7aea8fe7fb0a000f0233186a0c977dc11a58444004978323f478a992d3c147418d4a6f4e774e973a67dc
|
@@ -61,17 +61,12 @@ module Cyborg
|
|
61
61
|
dest = destination(file).sub(/\.js$/,'')
|
62
62
|
options = " -t babelify --standalone #{plugin.name} -o #{dest}.js -d"
|
63
63
|
|
64
|
-
|
65
|
-
npm_path "browserify #{file} #{options}"
|
64
|
+
if Cyborg.production?
|
65
|
+
npm_path "browserify #{file} #{options} -p [ minifyify --map #{url(file).sub(/\.js$/,'')}.map.json --output #{dest}.map.json ]"
|
66
66
|
else
|
67
67
|
npm_path "browserifyinc --cachefile #{cache_file(File.basename(dest))} #{file} #{options}"
|
68
68
|
end
|
69
69
|
|
70
|
-
if Cyborg.production?
|
71
|
-
cmd += " -p [ minifyify --map #{url(file).sub(/\.js$/,'')}.map.json --output #{dest}.map.json ]"
|
72
|
-
end
|
73
|
-
|
74
|
-
cmd
|
75
70
|
end
|
76
71
|
end
|
77
72
|
end
|
@@ -28,7 +28,11 @@ module Cyborg
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def local_path(path)
|
31
|
-
File.expand_path(path)
|
31
|
+
path = File.expand_path(path)
|
32
|
+
|
33
|
+
# Strip all irrelevant sections of the path
|
34
|
+
path.sub(plugin.paths[:javascripts]+'/', '') # written to assets dir
|
35
|
+
.sub(plugin.root+'/','') # writtent to public dir
|
32
36
|
end
|
33
37
|
|
34
38
|
def build
|
@@ -39,7 +43,12 @@ module Cyborg
|
|
39
43
|
return if @svg.files.empty?
|
40
44
|
|
41
45
|
if files = @svg.write
|
42
|
-
files.each
|
46
|
+
files.each do |file|
|
47
|
+
if file.start_with?(plugin.destination)
|
48
|
+
compress(file)
|
49
|
+
end
|
50
|
+
puts build_success(file)
|
51
|
+
end
|
43
52
|
else
|
44
53
|
log_error "FAILED TO BUILD SVGs"
|
45
54
|
end
|
data/lib/cyborg/version.rb
CHANGED