cyborg 0.5.19 → 0.5.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14157d34a623fc5d573d6ed3ce62e985ed92f8da
4
- data.tar.gz: dbe6d589c65dab63b5b1a739bdc4d427123691c9
3
+ metadata.gz: 18932df829227244205d712f5f24606b960dbfc3
4
+ data.tar.gz: 00bf1a7894c7d4b08172b0f5760cb72ac1e1923c
5
5
  SHA512:
6
- metadata.gz: 156bb1c8a8ae12d4d9a6c4e526e2fcf819f3861b8805d3a4597c57dee5ba0188c50cff47caa5f9d252a9b87dcad5862937ca37d01ddbae5b59ad9fe1c5e46cd2
7
- data.tar.gz: 7d9116e409d5246193233ab6811369fe8f3f8ea017fe8b1027fdcf6635c27dd0b879d7a41ea8e68687928cc84803403d9a7b993a693fec130e132081212294ee
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
- cmd = if Cyborg.production?
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).sub(plugin.paths[:javascripts], '').sub(/^\//,'')
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 { |file| puts build_success(file) }
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
@@ -1,3 +1,3 @@
1
1
  module Cyborg
2
- VERSION = "0.5.19"
2
+ VERSION = "0.5.20"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cyborg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.19
4
+ version: 0.5.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis