middleman-condenser 0.0.2 → 0.0.3

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
  SHA256:
3
- metadata.gz: f641e866c9d3ee8ede36774b4a5055bd094c0fb5593d646933ea2e749ce0b18c
4
- data.tar.gz: e6e38e7509b88c6033a019d927612d7b3ea9fa9a46e750bcb148ab5b73871538
3
+ metadata.gz: 98e2e8278958537ad32603d9228b67dcb19230ea3f2fff820cf9b3dee81ba53a
4
+ data.tar.gz: 889c0c1de0bbba7d2b8870a9c97ae384f15fc243dc6bd910ac92639c3d09a44e
5
5
  SHA512:
6
- metadata.gz: '05248be10584828b99e556cb2546ebf174989c044700b6eea54d2b4a3f011afcf6316305de2ac36d7c11b7a8c93c8b8d6381079afe17d9352d04dede420f550b'
7
- data.tar.gz: bc23ab51405dde4f446e9b3baff33428830ea5ae1d7be98f879ab03130747cdb458f4c8e78e9978701a95f4f78cc968eed7296f765e64404af3921a855847e97
6
+ metadata.gz: 96f1203fc1cbc12aa45cc0dd01523d4c33ca9d68809c3a15496df235d277baa592eb0bdffe1602005629f9e6605e8f1d9a9588492b31bf92a07af3cf9e4fe563
7
+ data.tar.gz: 9fcfdf7e4712021570c9e4a5bd8c34502695f5eac3bb31bb285efb7e0c199e1ee62fcb92cda879e24e926b5f758e11bbf90fd5c61583aa5ffadb99ac06174cfd
@@ -5,5 +5,5 @@ require "middleman-core"
5
5
  ::Middleman::Condenser
6
6
  end
7
7
 
8
- puts ::Middleman::Extensions.instance_variable_get(:@auto_activate)[:before_configuration].delete_if { |i| i.name == :sass_renderer}
9
- puts ::Middleman::Extensions.registered.delete(:sass_renderer)
8
+ ::Middleman::Extensions.instance_variable_get(:@auto_activate)[:before_configuration].delete_if { |i| i.name == :sass_renderer}
9
+ ::Middleman::Extensions.registered.delete(:sass_renderer)
@@ -68,10 +68,16 @@ class Middleman::Condenser < ::Middleman::Extension
68
68
  def after_configuration
69
69
  # Do something
70
70
  end
71
+
72
+ def after_build(b)
73
+ @required_assets.each do |asset|
74
+ puts @condenser.find_export(asset).write(File.join(app.config[:build_dir], options[:prefix]))
75
+ end
76
+ end
71
77
 
72
78
  def manipulate_resource_list resources
73
79
  resources.reject do |resource|
74
- resource.path.start_with?(options[:prefix])
80
+ resource.path.start_with?(options[:prefix].sub(/^\//, ''))
75
81
  end
76
82
  end
77
83
 
@@ -81,7 +87,6 @@ class Middleman::Condenser < ::Middleman::Extension
81
87
  manifest = Condenser::Manifest.new(@condenser, build_dir)
82
88
  puts @required_assets.inspect
83
89
  manifest.compile(@required_assets).each do |a|
84
- puts a.inspect
85
90
  builder.instance_variable_get(:@to_clean).delete_if! { |x| a.to_s == a }
86
91
  end
87
92
  end
@@ -91,8 +96,10 @@ class Middleman::Condenser < ::Middleman::Extension
91
96
  def asset_path(kind, source=nil, options={})
92
97
  accept = case kind
93
98
  when :css
99
+ source << ".#{kind}" if !source.end_with?(kind.to_s)
94
100
  'text/css'
95
101
  when :js
102
+ source << ".#{kind}" if !source.end_with?(kind.to_s)
96
103
  'application/javascript'
97
104
  end
98
105
 
@@ -104,7 +111,6 @@ class Middleman::Condenser < ::Middleman::Extension
104
111
  end
105
112
 
106
113
  def image_tag(source, options = {})
107
- puts 'xx'
108
114
  if options[:size] && (options[:height] || options[:width])
109
115
  raise ArgumentError, "Cannot pass a :size option with a :height or :width option"
110
116
  end
@@ -112,7 +118,6 @@ class Middleman::Condenser < ::Middleman::Extension
112
118
  src = options[:src] = asset_path(source)
113
119
 
114
120
  options[:width], options[:height] = extract_dimensions(options.delete(:size)) if options[:size]
115
- puts options.inspect
116
121
  tag("img", options)
117
122
  end
118
123
 
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "middleman-condenser"
5
- s.version = "0.0.2"
5
+ s.version = "0.0.3"
6
6
  s.licenses = ['MIT']
7
7
  s.authors = ["Jonathan Bracy"]
8
8
  s.email = ["jonbracy@gmail.com"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-condenser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Bracy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-11 00:00:00.000000000 Z
11
+ date: 2018-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: condenser