You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update documentation for public package distribution
Following PR #1901's switch from GitHub Packages to public distribution,
update all documentation to reflect that React on Rails Pro packages are
now publicly available on npmjs.org and RubyGems.org.
Changes:
- Remove all GitHub Personal Access Token requirements
- Remove .npmrc and gem credentials configuration steps
- Simplify installation to standard gem/npm commands
- Update releasing docs to show all 5 packages as public
- Remove "private repository" language throughout
- Update troubleshooting to remove token-related issues
Files updated:
- react_on_rails_pro/docs/installation.md (major simplification)
- docs/contributor-info/releasing.md
- react_on_rails_pro/docs/contributors-info/releasing.md
- react_on_rails_pro/docs/contributors-info/onboarding-customers.md
- react_on_rails_pro/docs/troubleshooting.md
- react_on_rails_pro/docs/ruby-api.md
- react_on_rails_pro/docs/code-splitting-loadable-components.md
- react_on_rails_pro/docs/node-renderer/basics.md
- react_on_rails_pro/docs/node-renderer/error-reporting-and-tracing.md
To make HMR work, it's best to disable loadable-components when using the Dev Server.
273
-
Note: you will need access to our **private** React on Rails Pro repository to open the following links.
274
273
275
274
Take a look at the code searches for ['imports-loadable'](https://github.com/shakacode/react_on_rails_pro/search?q=imports-loadable&type=code) and ['imports-hmr'](https://github.com/shakacode/react_on_rails_pro/search?q=imports-hmr&type=code)
276
275
@@ -297,8 +296,6 @@ And compare:
297
296
298
297
### Routes file
299
298
300
-
Note: you will need access to our **private** React on Rails Pro repository to open the following links.
Since the repository is private, you will get a **GitHub Personal Access Token** and an account that can access the packages. Substitute that value in the commands below. If you dont' have this, ask [[email protected]](mailto:[email protected]) to give you one.
2
+
3
+
React on Rails Pro packages are now publicly available on npmjs.org and RubyGems.org. No authentication or special access is required.
3
4
4
5
Check the [CHANGELOG](https://github.com/shakacode/react_on_rails_pro/blob/master/CHANGELOG.md) to see what version you want.
5
6
@@ -9,48 +10,30 @@ For the below docs, find the desired `<version>` in the CHANGELOG. Note, for pre
9
10
10
11
# Ruby
11
12
## Gem Installation
12
-
1. Ensure your **Rails** app is using the **react_on_rails** gem, version greater than 11.0.7.
13
-
1. Add the `react_on_rails_pro` gem to your **Gemfile**. Substitute the appropriate version number.
14
-
15
-
## Gemfile Change
16
13
17
-
Replace the following in the snippet for the Gemfile
18
-
1.`<account>` for the api key
19
-
2.`<api-key>`
20
-
3.`<version>` desired
14
+
1. Ensure your **Rails** app is using the **react_on_rails** gem, version greater than 11.0.7.
15
+
2. Add the `react_on_rails_pro` gem to your **Gemfile**. Substitute the appropriate version number.
21
16
22
-
```ruby
23
-
source "https://<rorp-account>:<token>@"\
24
-
"rubygems.pkg.github.com/shakacode-tools"do
25
-
gem "react_on_rails_pro", "<version>"
26
-
end
27
-
```
17
+
## Gemfile
28
18
29
-
## Alternate installation keeping the key out of your Gemfile
4. Be sure to run `npm i` **and not** `yarn` as only npm seems to work with the private github packages.
61
+
3. Install dependencies using npm or yarn:
86
62
87
-
If you really want to use yarn, see [Yarn can't find private Github npm registry](https://stackoverflow.com/questions/58316109/yarn-cant-find-private-github-npm-registry)
63
+
```bash
64
+
npm install
65
+
# or
66
+
yarn install
67
+
```
88
68
89
-
5. You can start the renderer with either the executable `node-renderer` or, preferably, with
69
+
4. You can start the renderer with either the executable `node-renderer` or, preferably, with
90
70
a startup JS file, say called `react-on-rails-pro/react-on-rails-pro-node-renderer.js` with
91
71
these contents. _Note the use of the namespaced **`@shakacode-tools/react-on-rails-pro-node-renderer`** for the package.
92
72
@@ -141,43 +121,8 @@ if (env.CI) {
141
121
reactOnRailsProNodeRenderer(config)
142
122
```
143
123
144
-
## Instructions for using a branch
145
-
146
-
Install the node-renderer executable, possibly globally. Substitute the branch name or tag for`master`
147
-
```
148
-
yarn global add https://<your-github-token>:[email protected]/shakacode/react_on_rails_pro.git\#master
See [NodeRenderer JavaScript Configuration](./node-renderer/js-configuration.md).
168
126
169
127
#### Webpack Configuration
170
-
Set your server bundle webpack configuration to use a target of `node` per the [Webpack docs](https://webpack.js.org/concepts/targets/#usage).
171
-
172
-
## Authentication when using Github packages
173
-
[Auth for the npm package](https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-npm-for-use-with-github-packages#authenticating-to-github-packages)
174
-
175
-
Create a new ~/.npmrc file if one doesn't exist.
176
-
```
177
-
//npm.pkg.github.com/:_authToken=TOKEN
178
-
```
179
-
180
-
To configure bundler if you don't want the token in your Gemfile:
4. Configure a JavaScript file that will launch the rendering server per the docs in [Node Renderer JavaScript Configuration](./js-configuration.md). For example, create a file `node-renderer.js`. Here is a simple example that uses all the defaults except for bundlePath:
Copy file name to clipboardExpand all lines: react_on_rails_pro/docs/node-renderer/error-reporting-and-tracing.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,8 +47,7 @@ To enable Sentry Tracing:
47
47
48
48
## Other services
49
49
You can create your own integrations in the same way as the provided ones.
50
-
If you have access to the React on Rails Pro repository,
51
-
you can use [their implementations](https://github.com/shakacode/react_on_rails_pro/tree/master/packages/node-renderer/src/integrations) as examples.
50
+
You can use [the provided implementations](https://github.com/shakacode/react_on_rails_pro/tree/master/packages/node-renderer/src/integrations) as examples.
52
51
Import these functions from `@shakacode-tools/react-on-rails-pro-node-renderer/integrations/api`:
Copy file name to clipboardExpand all lines: react_on_rails_pro/docs/ruby-api.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
# Ruby API
2
2
3
-
Note: you will need access to our **private** React on Rails Pro repository to open the following links.
4
-
5
3
## View Helpers
6
4
7
5
See the [app/helpers/react_on_rails_pro_helper.rb](https://github.com/shakacode/react_on_rails_pro/blob/master/app/helpers/react_on_rails_pro_helper.rb) source.
0 commit comments