middleman-targets 1.0.10 → 1.0.11
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca4461d428b23805b22490d34f982653f8672c5e
|
4
|
+
data.tar.gz: c641ebab71e92cb56268759ce0fb3962032c1e56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 249127f0ac430965e499cd1cb33897e5b49f54167cd42466becd181a502b9b2c3ab26545e88d7be4ee63ef385163c8a6dc7955bda9844ae0ef6d99a004410b3e
|
7
|
+
data.tar.gz: 828add7e1cd36c5ea3e8b63cac842d5869078021f63183cb7d7732aa4eadca1307f1d17d8c3246c3c7fb19c9b18b07796924d1b251fc02af1d0b04d2d761be69
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
middleman-targets change log
|
2
2
|
============================
|
3
3
|
|
4
|
-
- Version 1.0.
|
4
|
+
- Version 1.0.11 / 2018-June-08
|
5
5
|
|
6
|
+
- Changed list_all for compatibility with other gems.
|
6
7
|
- Bump to version 1.0.10, because list_all command line option was added.
|
7
8
|
|
8
9
|
- Version 1.0.9 / 2018-May-26
|
@@ -16,7 +17,7 @@ middleman-targets change log
|
|
16
17
|
|
17
18
|
- Added middleman_target exposed to config.rb
|
18
19
|
|
19
|
-
- Version 1.0.7 / 2016-May-
|
20
|
+
- Version 1.0.7 / 2016-May-15
|
20
21
|
|
21
22
|
- Bump to 1.0.7 fixes:
|
22
23
|
- Require capybara as development dependency fixes broken testing.
|
@@ -9,6 +9,6 @@ gem 'wdm', '~> 0.1.0', platforms: [:mswin, :mingw]
|
|
9
9
|
gem 'tzinfo-data', platforms: [:mswin, :mingw, :jruby]
|
10
10
|
|
11
11
|
# Middleman Gems
|
12
|
-
gem 'middleman-targets', '~>1.0.
|
12
|
+
gem 'middleman-targets', '~>1.0.11.wip'
|
13
13
|
gem 'middleman', ['~> 4.1', '>= 4.1.7']
|
14
14
|
gem 'middleman-syntax'
|
@@ -120,28 +120,30 @@ class MiddlemanTargets < ::Middleman::Extension
|
|
120
120
|
#############################################################
|
121
121
|
def after_configuration
|
122
122
|
|
123
|
-
return if app.config[:exit_before_ready]
|
124
|
-
|
125
123
|
app.config[:target] = app.config[:target].downcase.to_sym
|
126
124
|
requested_target = app.config[:target]
|
127
125
|
valid_targets = app.config[:targets].each_key.collect { |item| item.downcase}
|
128
126
|
|
127
|
+
if (build_dir = app.config[:targets][app.config[:target]][:build_dir])
|
128
|
+
app.config[:build_dir] = sprintf(build_dir, requested_target)
|
129
|
+
else
|
130
|
+
app.config[:build_dir] = "#{app.config[:build_dir]} (#{requested_target})"
|
131
|
+
end
|
132
|
+
|
129
133
|
if valid_targets.count < 1
|
130
134
|
say 'middleman-targets is activated but there are no targets specified in your', :red
|
131
135
|
say 'configuration file.', :red
|
132
136
|
exit 1
|
133
137
|
end
|
134
138
|
|
139
|
+
return if app.config[:exit_before_ready]
|
140
|
+
|
141
|
+
|
135
142
|
if valid_targets.include?(requested_target)
|
136
143
|
|
137
144
|
if app.config[:mode] == :server
|
138
145
|
say "Middleman will serve using target \"#{requested_target}\".", :blue
|
139
146
|
else
|
140
|
-
if (build_dir = app.config[:targets][app.config[:target]][:build_dir])
|
141
|
-
app.config[:build_dir] = sprintf(build_dir, requested_target)
|
142
|
-
else
|
143
|
-
app.config[:build_dir] = "#{app.config[:build_dir]} (#{requested_target})"
|
144
|
-
end
|
145
147
|
say "Middleman will build using target \"#{requested_target}\".", :blue
|
146
148
|
say "Build directory is \"#{app.config[:build_dir]}\".", :blue
|
147
149
|
end
|
@@ -18,28 +18,43 @@ module Middleman::Cli
|
|
18
18
|
# @return [Void]
|
19
19
|
############################################################
|
20
20
|
def list_all
|
21
|
-
|
22
|
-
#
|
21
|
+
|
22
|
+
# Determine the valid targets.
|
23
23
|
app = ::Middleman::Application.new do
|
24
24
|
config[:exit_before_ready] = true
|
25
25
|
end
|
26
|
-
|
26
|
+
app_config = app.config.clone
|
27
27
|
app.shutdown!
|
28
28
|
|
29
|
-
|
30
|
-
|
29
|
+
# Spin up an instance for each target to get its
|
30
|
+
# output path.
|
31
|
+
app_config[:targets].each do |target|
|
31
32
|
requested_target = target[0]
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
out_path = "#{config[:build_dir]} (#{requested_target.to_s})"
|
33
|
+
app = ::Middleman::Application.new do
|
34
|
+
config[:target] = requested_target
|
35
|
+
config[:exit_before_ready] = true
|
36
36
|
end
|
37
|
-
|
38
|
-
|
39
|
-
|
37
|
+
config = app.config.clone
|
38
|
+
app.shutdown!
|
39
|
+
out_path = File.expand_path(config[:build_dir])
|
40
40
|
say "#{requested_target.to_s}, #{out_path}", :cyan
|
41
|
-
|
42
41
|
end
|
42
|
+
|
43
|
+
|
44
|
+
# config[:targets].each do |target|
|
45
|
+
# out_path = ''
|
46
|
+
# requested_target = target[0]
|
47
|
+
# if (build_dir = config[:targets][requested_target][:build_dir])
|
48
|
+
# out_path = sprintf(build_dir, requested_target.to_s)
|
49
|
+
# else
|
50
|
+
# out_path = "#{config[:build_dir]} (#{requested_target.to_s})"
|
51
|
+
# end
|
52
|
+
#
|
53
|
+
# out_path = File.expand_path(out_path)
|
54
|
+
#
|
55
|
+
# say "#{requested_target.to_s}, #{out_path}", :cyan
|
56
|
+
#
|
57
|
+
# end
|
43
58
|
end
|
44
59
|
|
45
60
|
Base.register(self, 'list_all', 'list_all', 'Lists all targets')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-targets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Derry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman-core
|