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 +4 -4
- data/lib/middleman-condenser.rb +2 -2
- data/lib/middleman/condenser.rb +9 -4
- data/middleman-condenser.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98e2e8278958537ad32603d9228b67dcb19230ea3f2fff820cf9b3dee81ba53a
|
4
|
+
data.tar.gz: 889c0c1de0bbba7d2b8870a9c97ae384f15fc243dc6bd910ac92639c3d09a44e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96f1203fc1cbc12aa45cc0dd01523d4c33ca9d68809c3a15496df235d277baa592eb0bdffe1602005629f9e6605e8f1d9a9588492b31bf92a07af3cf9e4fe563
|
7
|
+
data.tar.gz: 9fcfdf7e4712021570c9e4a5bd8c34502695f5eac3bb31bb285efb7e0c199e1ee62fcb92cda879e24e926b5f758e11bbf90fd5c61583aa5ffadb99ac06174cfd
|
data/lib/middleman-condenser.rb
CHANGED
@@ -5,5 +5,5 @@ require "middleman-core"
|
|
5
5
|
::Middleman::Condenser
|
6
6
|
end
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
::Middleman::Extensions.instance_variable_get(:@auto_activate)[:before_configuration].delete_if { |i| i.name == :sass_renderer}
|
9
|
+
::Middleman::Extensions.registered.delete(:sass_renderer)
|
data/lib/middleman/condenser.rb
CHANGED
@@ -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
|
|
data/middleman-condenser.gemspec
CHANGED
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.
|
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
|
+
date: 2018-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: condenser
|