quilt_rails 1.13.0 → 2.0.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: dee878b6b3d7207ed8c6883791e896ccc1208d6508aae5c592487d2da900cf91
4
- data.tar.gz: 38f3fbd9695b816b0a873891b3fd6b90377f541595ac3427b11677d62289e6aa
3
+ metadata.gz: c6dead256d2474833a254f212522b7e05b4c7a798d082a2a84b7b2003606583d
4
+ data.tar.gz: c77e268a3c4be95a2990087ad03400cf16c5b8ba8fcd25f36cbb095b7ce6d169
5
5
  SHA512:
6
- metadata.gz: 0fb1891f8f988bb0b1b8c60c7b5b25e45c8859ba06ef855625d4656fd24f54a79ead749bad2ee0a2a15559ce097106215d5801a6eda9b3b6c55b7fdc2ee42895
7
- data.tar.gz: 74d4d5a3b5ed3e96ce4d3348c67ecc89e6022c24cf631c3be192eb43b7ca4202e4d82351d0d22fd8385ddc75c3ddc82657ca54689b35a1341b44de8b3bf70aa9
6
+ metadata.gz: ebc9c4a21b3e5046583a3e9711c084856c2a46844806f058d26e0bc90b06bab6f9be7074b91c216d75ccfb6883fe20c01fc250744a6c2b725b63633b88046ae5
7
+ data.tar.gz: 4c490e4b849cd5a6e548285129eaa130c7217c4d9534b76899a274983ce298a568d5e7713d59a31bd1406e4f46e91ce34b4d4b2c089ecf424cd704d572a2b638
data/README.md CHANGED
@@ -23,7 +23,7 @@ A turn-key solution for integrating Quilt client-side libraries into your Rails
23
23
 
24
24
  ## Server-side-rendering
25
25
 
26
- 🗒 This guide is focused on internal Shopify developers with access to [`dev`](https://github.com/Shopify/dev) and [@shopify/sewing-kit](https://github.com/Shopify/sewing-kit). A similar setup can be achieved using the [manual installation](./docs/manual-installation) , and following the [react-server-webpack-plugin](../../packages/react-server-webpack-plugin/README.md) guide. Apps not running on Shopify infrastructure should [disable server-side GraphQL queries](./docs/FAQ.md) to avoid scalability issue.
26
+ 🗒 This guide is focused on internal Shopify developers with access to [`dev`](https://github.com/Shopify/dev) and [@shopify/sewing-kit](https://github.com/Shopify/sewing-kit). A similar setup can be achieved using the [manual installation](./docs/manual-installation.md) , and following the [react-server webpack plugin](../../packages/react-server/README.md#webpack-plugin) guide. Apps not running on Shopify infrastructure should [disable server-side GraphQL queries](./docs/FAQ.md) to avoid scalability issue.
27
27
 
28
28
  ### Quick start
29
29
 
@@ -36,7 +36,7 @@ When prompted, choose `rails`. This will generate a basic Rails application scaf
36
36
 
37
37
  Alternatively, you can use [`rails new .`](https://guides.rubyonrails.org/command_line.html#rails-new) to do the same.
38
38
 
39
- In either case, remove [`webpacker`](./docs/FAQ.md#i-run-into-webpacker-issue-while-setting-up-quilt_rails) before continuing.
39
+ In either case, remove [`webpacker`](./docs/FAQ.md#i-run-into-webpacker-issue-while-setting-up-quilt_rails) and [these files](./docs/FAQ.md#any-other-files-i-should-remove-before-running-generator) that any create conflict before continuing.
40
40
 
41
41
  #### Add Ruby dependencies
42
42
 
@@ -46,7 +46,11 @@ This will install our ruby dependencies and update the project's gemfile.
46
46
 
47
47
  #### Generate app boilerplate
48
48
 
49
- `rails generate quilt_rails:install`
49
+ `rails generate sewing_kit:install`
50
+
51
+ This will generate a package.json file with common sewing-kit script tasks, default lint, format configuration; a sewing-kit configuration file, and other project default configurations.
52
+
53
+ `rails generate quilt:install`
50
54
 
51
55
  This will install Node dependencies, provide a basic React app (in TypeScript), and mount the Quilt engine in `config/routes.rb`. Basic linting and format configurations are also generated.
52
56
 
@@ -61,7 +65,7 @@ Will run the application, starting up both servers and compiling assets.
61
65
 
62
66
  ### Manual installation
63
67
 
64
- Follow [this guide](./docs/manual-installation) on how to do manual setup without the generator.
68
+ Follow [this guide](./docs/manual-installation.md) on how to do manual setup without the generator.
65
69
 
66
70
  ### Advanced use
67
71
 
@@ -222,7 +226,7 @@ With SSR enabled React apps, state must be serialized on the server and deserial
222
226
 
223
227
  #### Customizing the Node server
224
228
 
225
- By default, sewing-kit bundles in [`@shopify/react-server-webpack-plugin`](../../packages/react-server-webpack-plugin/README.md) for `quilt_rails` applications to get apps up and running fast without needing to manually write any Node server code.
229
+ By default, sewing-kit bundles in [`@shopify/react-server/webpack-plugin`](../../packages/react-server/README.md#webpack-plugin) for `quilt_rails` applications to get apps up and running fast without needing to manually write any Node server code.
226
230
 
227
231
  If what it provides is not sufficient, a completely custom server can be defined by adding a `server.js` or `server.ts` file to the `app/ui` folder. The simplest way to customize the server is to export the object created by [`@shopify/react-server`](../../packages/react-server/README.md#node-usage)'s `createServer` call in `server.ts` file.
228
232
 
@@ -280,12 +284,12 @@ end
280
284
  ## Performance tracking a React app
281
285
 
282
286
  To setup performance tracking with your React app with `quilt_rails`.
283
- Follow details guide [here](./docs/performance-tracking).
287
+ Follow details guide [here](./docs/performance-tracking.md).
284
288
 
285
289
  ## API
286
290
 
287
- Find all features this gem offer in this [API doc](./docs/api).
291
+ Find all features this gem offer in this [API doc](./docs/api.md).
288
292
 
289
293
  ## FAQ
290
294
 
291
- Find your [here](./docs/FAQ).
295
+ Find your [here](./docs/FAQ.md).
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Quilt
3
- VERSION = "1.13.0"
3
+ VERSION = "2.0.0"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quilt_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathew Allen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-02 00:00:00.000000000 Z
11
+ date: 2020-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -106,12 +106,6 @@ files:
106
106
  - lib/generators/quilt/react_setup/react_setup_generator.rb
107
107
  - lib/generators/quilt/react_setup/templates/App.tsx
108
108
  - lib/generators/quilt/react_setup/templates/tsconfig.json
109
- - lib/generators/quilt_rails/USAGE
110
- - lib/generators/quilt_rails/install_generator.rb
111
- - lib/generators/sewing_kit/USAGE
112
- - lib/generators/sewing_kit/install_generator.rb
113
- - lib/generators/sewing_kit/templates/package.json
114
- - lib/generators/sewing_kit/templates/sewing-kit.config.ts
115
109
  - lib/quilt_rails.rb
116
110
  - lib/quilt_rails/configuration.rb
117
111
  - lib/quilt_rails/engine.rb
@@ -1,5 +0,0 @@
1
- Description:
2
- This generator runs all the generators
3
-
4
- Example:
5
- rails generate quilt_rails:install
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module QuiltRails
4
- class InstallGenerator < Rails::Generators::Base
5
- def run_all_generators
6
- generate("sewing_kit:install")
7
- generate("quilt:install")
8
- end
9
- end
10
- end
@@ -1,5 +0,0 @@
1
- Description:
2
- This generator creates a sewing-kit config file.
3
-
4
- Example:
5
- rails generate sewing_kit:install
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SewingKit
4
- class InstallGenerator < Rails::Generators::Base
5
- source_root File.expand_path('templates', __dir__)
6
-
7
- desc "This generator creates a sewing-kit config file."
8
-
9
- def initialize(args, *options)
10
- @application_name = Rails.application.class.module_parent.to_s.underscore
11
- super(args, *options)
12
- end
13
-
14
- def create_package_json
15
- package_json_path = "package.json"
16
-
17
- copy_file(package_json_path)
18
- gsub_file(package_json_path, "\${application_name}", @application_name)
19
- end
20
-
21
- def create_sk_config
22
- sk_config_path = "config/sewing-kit.config.ts"
23
-
24
- copy_file("sewing-kit.config.ts", sk_config_path)
25
- gsub_file(sk_config_path, "\${application_name}", @application_name)
26
- end
27
-
28
- def create_config_files
29
- copy_file(".editorconfig")
30
- copy_file(".eslintignore")
31
- copy_file(".prettierignore")
32
- end
33
- end
34
- end
@@ -1,31 +0,0 @@
1
- {
2
- "name": "${application_name}",
3
- "private": true,
4
- "sideEffects": false,
5
- "scripts": {
6
- "dev": "sewing-kit dev",
7
- "check": "sewing-kit check",
8
- "lint": "sewing-kit lint",
9
- "type-check": "sewing-kit type-check",
10
- "nuke": "sewing-kit nuke",
11
- "test": "sewing-kit test"
12
- },
13
- "eslintConfig": {
14
- "extends": [
15
- "plugin:@shopify/typescript",
16
- "plugin:@shopify/react",
17
- "plugin:@shopify/prettier",
18
- "plugin:@shopify/jest",
19
- "plugin:@shopify/polaris"
20
- ]
21
- },
22
- "prettier": "@shopify/prettier-config",
23
- "stylelint": {
24
- "extends": [
25
- "@shopify/stylelint-plugin/prettier"
26
- ]
27
- },
28
- "resolutions": {
29
- "babel-plugin-dynamic-import-node": "2.3.0"
30
- }
31
- }
@@ -1,11 +0,0 @@
1
- /* eslint-env node */
2
-
3
- import {Plugins} from '@shopify/sewing-kit';
4
-
5
- export default function sewingKitConfig(plugins: Plugins) {
6
- return {
7
- name: "${application_name}",
8
- plugins: [
9
- ],
10
- };
11
- }