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
The [`spec/dummy` app](https://github.com/shakacode/react_on_rails/blob/master/spec/dummy) is an example of the various setup techniques you can use with the gem.
55
+
The [`react_on_rails/spec/dummy` app](https://github.com/shakacode/react_on_rails/blob/master/react_on_rails/spec/dummy) is an example of the various setup techniques you can use with the gem.
56
56
57
-
There are also two such apps for React on Rails Pro: [one using the Node renderer](https://github.com/shakacode/react_on_rails/blob/master/react_on_rails_pro/spec/dummy) and [one using ExecJS](https://github.com/shakacode/react_on_rails/blob/master/react_on_rails_pro/spec/execjs-compatible-dummy).
57
+
There are also two such apps for React on Rails Pro: [one using the Node renderer](https://github.com/shakacode/react_on_rails/blob/master/react_on_rails_pro/react_on_rails/spec/dummy) and [one using ExecJS](https://github.com/shakacode/react_on_rails/blob/master/react_on_rails_pro/spec/execjs-compatible-dummy).
58
58
59
59
When you add a new feature, consider adding an example demonstrating it to the example apps.
60
60
@@ -124,19 +124,19 @@ When you run `yalc push`, you'll get an informative message
124
124
```terminaloutput
125
125
$ yalc push
126
126
react-on-rails@12.0.0-12070fd1 published in store.
127
-
Pushing react-on-rails@12.0.0 in /Users/justin/shakacode/react-on-rails/react_on_rails/spec/dummy
Don't forget you may need to run yarn after adding packages with yalc to install/update dependencies/bin scripts.
130
130
```
131
131
132
132
Of course, you can do the same with `react-on-rails-pro` and `react-on-rails-pro-node-renderer` packages.
133
133
134
-
This is the approach `spec/dummy` apps use, so you can also look at their implementation.
134
+
This is the approach `react_on_rails/spec/dummy` apps use, so you can also look at their implementation.
135
135
136
136
### Example: Testing NPM changes with the dummy app
137
137
138
138
1. Add `console.log('Hello!')` to [clientStartup.ts, function render](https://github.com/shakacode/react_on_rails/blob/master/packages/react-on-rails/src/clientStartup.ts) in `/packages/react-on-rails/src/clientStartup.ts` to confirm we're getting an update to the node package client-side. Do the same for function `serverRenderReactComponent` in [/packages/react-on-rails/src/serverRenderReactComponent.ts](https://github.com/shakacode/react_on_rails/blob/master/packages/react-on-rails/src/serverRenderReactComponent.ts).
139
-
2. Refresh the browser if the server is already running or start the server using `foreman start` from `react_on_rails/spec/dummy` and navigate to `http://localhost:3000/`. You will now see the `Hello!` message printed in the browser's console. If you did not see that message, then review the steps above for the workflow of making changes and pushing them via yalc.
139
+
2. Refresh the browser if the server is already running or start the server using `foreman start` from `react_on_rails/react_on_rails/spec/dummy` and navigate to `http://localhost:3000/`. You will now see the `Hello!` message printed in the browser's console. If you did not see that message, then review the steps above for the workflow of making changes and pushing them via yalc.
140
140
141
141
## Git dependencies
142
142
@@ -199,7 +199,7 @@ or the equivalent command for your package manager.
199
199
200
200
### Prereqs
201
201
202
-
After checking out the repo, making sure you have Ruby and Node version managers set up (such as rvm and nvm, or rbenv and nodenv, etc.), cd to `spec/dummy` and run `bin/setup` to install ruby dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
202
+
After checking out the repo, making sure you have Ruby and Node version managers set up (such as rvm and nvm, or rbenv and nodenv, etc.), cd to `react_on_rails/spec/dummy` and run `bin/setup` to install ruby dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
203
203
204
204
### Local Node Package
205
205
@@ -224,8 +224,8 @@ yarn
224
224
yarn build
225
225
```
226
226
227
-
Or run this, which builds the Yarn package, then the Webpack files for `spec/dummy`, and runs tests in
228
-
`spec/dummy`.
227
+
Or run this, which builds the Yarn package, then the Webpack files for `react_on_rails/spec/dummy`, and runs tests in
228
+
`react_on_rails/spec/dummy`.
229
229
230
230
```sh
231
231
# Optionally change default capybara driver
@@ -253,10 +253,10 @@ cd react_on_rails/
253
253
yarn run test
254
254
```
255
255
256
-
### spec/dummy tests
256
+
### react_on_rails/spec/dummy tests
257
257
258
258
```sh
259
-
cd react_on_rails/spec/dummy
259
+
cd react_on_rails/react_on_rails/spec/dummy
260
260
rspec
261
261
```
262
262
@@ -309,7 +309,7 @@ To run the dummy app, it's **CRITICAL** to not just run `rails s`. You have to r
309
309
310
310
### RSpec Testing
311
311
312
-
Run `rake` for testing the gem and `spec/dummy`. Otherwise, the `rspec` command only works for testing within the sample apps, like `spec/dummy`.
312
+
Run `rake` for testing the gem and `react_on_rails/spec/dummy`. Otherwise, the `rspec` command only works for testing within the sample apps, like `react_on_rails/spec/dummy`.
313
313
314
314
If you run `rspec` at the top level, you'll see this message: `require': cannot load such file -- rails_helper (LoadError)`
315
315
@@ -794,7 +794,7 @@ You can run specific linting for directories or files by using `docker-compose r
794
794
2 files require updating to update the Rubocop version:
0 commit comments