sewing_kit 0.29.2 → 0.30.0

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: 96c1cff7a41987f3641dc138c952b10b9ea59e8d35a0d627e55a41e8777aaecf
4
- data.tar.gz: 5dd9d8b3b59aeb0a44951b489672f2d31ed78dff4642dc3df633b057a7b081bd
3
+ metadata.gz: 6d49a1c122dc45e1d1dd845253c81b9e70ff2dbea842da8f0f02cc9fcda2818b
4
+ data.tar.gz: 5c2f538d499f9d74f70b475e80ae99adcb1fa9ac6ab4170a5b36ab0505c1337f
5
5
  SHA512:
6
- metadata.gz: 97effd3933fafd4762b845974196a99f64855ec58279a7414cd811f146fe3d8bc182e3225f698d48a1dfd5d4ccba587bac8e841a3429f501d63c21f65c2563ca
7
- data.tar.gz: 16cb55ae8a57c3339aa5383de26d66ed5921ee8af2d19a23bfa2da2c5bdd7854d2e74cf1e04909ca90c3641a238167e4017c1fcf992dbff0479155c6faeb2afd
6
+ metadata.gz: 2ceebe52384ab58f86c83904978bd4bf87ee8646150fa313bda61db1f8729ddf82aaa10c91f0c8f30b89ef853f788e681eb4c9ebc25e9b4dc33b1cff85470d5f
7
+ data.tar.gz: 97ec1f7290f43f7d5d8b540f33b822453bf074585b268a2617af54a685d4c2fc78b18d52d4588ddf3b1065021f93270243020dd8a71ec5cd4f6c7d752cd7ae97
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+ module SewingKit
3
+ class Configuration
4
+ attr_accessor :build_options
5
+
6
+ def initialize
7
+ @build_options = nil
8
+ end
9
+ end
10
+
11
+ def self.configuration
12
+ @configuration ||= Configuration.new
13
+ end
14
+
15
+ def self.configure
16
+ yield(configuration)
17
+ end
18
+ end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module SewingKit
3
- VERSION = "0.29.2"
3
+ VERSION = "0.30.0"
4
4
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  require 'sewing_kit/webpack/webpack'
3
+ require 'sewing_kit/configuration'
3
4
 
4
5
  module SewingKit
5
6
  module Webpack
@@ -44,13 +45,20 @@ module SewingKit
44
45
  'build',
45
46
  '--mode',
46
47
  node_env,
47
- ].reject(&:empty?)
48
+ ].concat(options).reject(&:empty?)
48
49
  end
49
50
 
50
51
  def node_env
51
52
  ENV['NODE_ENV'] || Rails.env.to_s
52
53
  end
53
54
 
55
+ def options
56
+ build_options = SewingKit.configuration.build_options
57
+ return [] unless build_options
58
+
59
+ build_options.map { |key, value| ["--#{key}", value] }.flatten
60
+ end
61
+
54
62
  def node_installed?
55
63
  Kernel.system('node --version')
56
64
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sewing_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.29.2
4
+ version: 0.30.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Sauve
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-18 00:00:00.000000000 Z
11
+ date: 2019-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -89,6 +89,7 @@ extra_rdoc_files: []
89
89
  files:
90
90
  - README.md
91
91
  - lib/sewing_kit.rb
92
+ - lib/sewing_kit/configuration.rb
92
93
  - lib/sewing_kit/rails.rb
93
94
  - lib/sewing_kit/railtie.rb
94
95
  - lib/sewing_kit/version.rb