middleman-target 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -3
- data/lib/middleman-target/extension.rb +2 -0
- metadata +1 -1
data/README.md
CHANGED
@@ -41,7 +41,7 @@ If you wanted a particular condition to apply to more than one target you may do
|
|
41
41
|
|
42
42
|
..but that can get ugly. Instead we have the concept of "build target maps". They are declared in the config.rb:
|
43
43
|
|
44
|
-
|
44
|
+
activate :target do |t|
|
45
45
|
t.build_targets = {
|
46
46
|
"phonegap" => {
|
47
47
|
:includes => %w[android ios]
|
@@ -94,9 +94,9 @@ Add the following near the top of your config.rb:
|
|
94
94
|
require 'middleman-target'
|
95
95
|
activate :target
|
96
96
|
|
97
|
-
To specify a build target map, pass a block in to the "
|
97
|
+
To specify a build target map, pass a block in to the "activate" method as:
|
98
98
|
|
99
|
-
|
99
|
+
activate :target do |t|
|
100
100
|
t.build_targets = { ... }
|
101
101
|
end
|
102
102
|
|
@@ -28,6 +28,8 @@ module Middleman
|
|
28
28
|
if options.build_targets
|
29
29
|
raise "#build_targets must be a hash" unless options.build_targets.class == Hash
|
30
30
|
app.set :build_target_definitions, options.build_targets
|
31
|
+
else
|
32
|
+
app.set :build_target_definitions, {}
|
31
33
|
end
|
32
34
|
end
|
33
35
|
alias :included :registered
|