sewing_kit 0.97.1 → 0.97.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -0
- data/lib/sewing_kit/version.rb +1 -1
- data/lib/sewing_kit/webpack/compiler.rb +1 -1
- data/lib/sewing_kit/webpack/dev.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b06a7ac7ca6913c06fe04a78c864edfc777866c6c5091cd5c9e4498af7cf2f5
|
4
|
+
data.tar.gz: cc6753141c017b19eb312fec44d023c747419bebe9879084b79c8b60a6dcc895
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d76d48b71ded160f1f4033acb468a0f1b569499f91b228a144052b31fe1a137a61d77d725ffceb23052c25c2904ec6e088df1c1778ca80effb79d90991dc33be
|
7
|
+
data.tar.gz: 249abd4930b338521f16e141e0a9405d7386919e0e641991fae90983aba9c54979ad960b62fba674556f0a569c991e7473fdb5d37a278ec2d7aa5b38815820ac
|
data/README.md
CHANGED
@@ -70,6 +70,25 @@ SewingKit.configure do |config|
|
|
70
70
|
end
|
71
71
|
```
|
72
72
|
|
73
|
+
## Configuring production builds
|
74
|
+
|
75
|
+
`SewingKit.configure` provides a `build_options` attribute that adjusts the behaviour of sewing-kit's build. See [the `build` command's documentation](/docs/commands/build.md#options) for a full list of options.
|
76
|
+
|
77
|
+
### Usage
|
78
|
+
|
79
|
+
```rb
|
80
|
+
# config/initializers/sewing_kit.rb
|
81
|
+
SewingKit.configure do |config|
|
82
|
+
config.build_options = {
|
83
|
+
# Disable type checks for faster, low memory builds (TypeScript only)
|
84
|
+
# Note: you *must* have a separate `yarn sewing-kit type-check` CI step for this to be viable.
|
85
|
+
type_check: false,
|
86
|
+
# Increase heap to accommodate webpack's space for source map generation
|
87
|
+
heap: 2000
|
88
|
+
}
|
89
|
+
end
|
90
|
+
```
|
91
|
+
|
73
92
|
## Testing the front end
|
74
93
|
|
75
94
|
For fast tests with consistent results, test front-end components using Jest instead of Rails integration tests.
|
data/lib/sewing_kit/version.rb
CHANGED
@@ -55,7 +55,7 @@ module SewingKit
|
|
55
55
|
build_options = SewingKit.configuration.build_options
|
56
56
|
return [] unless build_options
|
57
57
|
|
58
|
-
build_options.map { |key, value| ["--#{key}", value] }.flatten
|
58
|
+
build_options.map { |key, value| ["--#{key.to_s.tr('_', '-')}", value.to_s] }.flatten
|
59
59
|
end
|
60
60
|
|
61
61
|
def node_installed?
|
@@ -90,7 +90,7 @@ module SewingKit
|
|
90
90
|
|
91
91
|
development_options
|
92
92
|
.reject { |key| key == :heap }
|
93
|
-
.map { |key, value| ["--#{key.to_s.tr('_', '-')}", value] }.flatten + focus.flatten
|
93
|
+
.map { |key, value| ["--#{key.to_s.tr('_', '-')}", value.to_s] }.flatten + focus.flatten
|
94
94
|
end
|
95
95
|
|
96
96
|
def log_level_from_rails
|
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.97.
|
4
|
+
version: 0.97.2
|
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-12-
|
11
|
+
date: 2019-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -118,10 +118,11 @@ files:
|
|
118
118
|
- lib/sewing_kit/webpack/manifest/test_with_no_assets.rb
|
119
119
|
- lib/sewing_kit/webpack/webpack.rb
|
120
120
|
- lib/tasks/sewing_kit.rake
|
121
|
-
homepage:
|
121
|
+
homepage: https://github.com/Shopify/sewing-kit/tree/master/gems/sewing_kit
|
122
122
|
licenses:
|
123
123
|
- MIT
|
124
|
-
metadata:
|
124
|
+
metadata:
|
125
|
+
changelog_uri: https://github.com/Shopify/sewing-kit/blob/master/gems/sewing_kit/CHANGELOG.md
|
125
126
|
post_install_message:
|
126
127
|
rdoc_options: []
|
127
128
|
require_paths:
|