README.md in sewing_kit-0.95.4 vs README.md in sewing_kit-0.96.0
- old
+ new
@@ -2,16 +2,10 @@
Zero configuration, high performance front end development at organization scale.
`sewing_kit` facilitates legacy Rails integration using ERB tags. For a more complete modern stack with performance-as-a-feature, consider [quilt_rails](https://github.com/Shopify/quilt/tree/master/gems/quilt_rails). For details of the `sewing-kit` node package's configuration and usage, see the [sewing-kit README](/README.md).
-## Use `quilt_rails` for React Server-Side-Rendering
-
-For React applications with a Rails backend, the best-practice for user-experience is server-side-rendering (SSR). **For building out React applications using SSR and Sewing-Kit, see [`quilt_rails`](https://github.com/Shopify/quilt/tree/master/gems/quilt_rails)**.
-
-If you are building a conventional Rails application using `.erb` files and just want modern JavaScript / TypeScript compilation, continue reading this document.
-
## Quick Start
Create a Rails project using `dev init` then:
### Install Sewing Kits
@@ -52,10 +46,32 @@
└── views
└─- layouts
└─- application.html.erb (must link to JS / CSS using sewing_kit_script_tag / sewing_kit_link_tag
```
+## Configuring development mode
+
+`SewingKit.configure` provides a `development_options` attribute that adjusts the behaviour of sewing-kit's development mode. See [the `dev` command's documentation](/docs/commands/dev.md) for a full list of options.
+
+### Usage
+
+```rb
+# config/initializers/sewing_kit.rb
+SewingKit.configure do |config|
+ # Disable hot module reloading
+ config.development_options[:hot] = false
+
+ # Launch development mode with extra memory (helpful if source maps are
+ # occupying more than Node's default 1.4GB heap allocation)
+ config.development_options[:heap] = 4000
+
+ # Disable source maps (very large apps may need to builds sans source maps to
+ # reduce development mode's memory usage)
+ config.development_options[:source_maps] = false
+end
+```
+
## Testing the front end
For fast tests with consistent results, test front-end components using Jest instead of Rails integration tests.
Use [`sewing-kit test`](https://github.com/Shopify/sewing-kit/blob/master/docs/commands/test.md#L3) to run all `.test.tsx` files in the `app/ui` directory. [Jest](https://jestjs.io) is used as a test runner, with customization available via [its sewing-kit plugin](https://github.com/Shopify/sewing-kit/blob/master/docs/plugins/jest.md).
@@ -77,10 +93,10 @@
The default behaviour is equivalent to this configuration:
```rb
# config/initializers/sewing_kit.rb
SewingKit.configure do |config|
- config.test_manifest_mode = :return_no_asets
+ config.test_manifest_mode = :return_no_assets
end
```
#### Use precompiled assets