File tree 3 files changed +29
-15
lines changed
lib/generators/react_on_rails
spec/react_on_rails/generators
3 files changed +29
-15
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,12 @@ def print_helpful_message
207
207
npm run rails-server
208
208
209
209
- Visit http://localhost:3000/hello_world and see your React On Rails app running!
210
+
211
+ - Run the npm express-server command to load the node server with hot reloading support.
212
+
213
+ npm run express-server
214
+
215
+ - Visit http://localhost:4000 and see your React On Rails app running using the Webpack Dev server.
210
216
MSG
211
217
GeneratorMessages . add_info ( message )
212
218
end
Original file line number Diff line number Diff line change @@ -45,17 +45,6 @@ def template_appropriate_version_of_hello_world_app_client
45
45
location = "client/app/bundles/HelloWorld/startup"
46
46
template ( "redux/base/#{ location } /HelloWorldAppClient.jsx.tt" , "#{ location } /#{ filename } " )
47
47
end
48
-
49
- def print_helpful_message
50
- message = <<-MSG
51
- - Run the npm express-server command to load the node server with hot reloading support.
52
-
53
- npm run express-server
54
-
55
- - Visit http://localhost:4000 and see your React On Rails app running using the Webpack Dev server.
56
- MSG
57
- GeneratorMessages . add_info ( message )
58
- end
59
48
end
60
49
end
61
50
end
Original file line number Diff line number Diff line change 245
245
npm run rails-server
246
246
247
247
- Visit http://localhost:3000/hello_world and see your React On Rails app running!
248
+
249
+ - Run the npm express-server command to load the node server with hot reloading support.
250
+
251
+ npm run express-server
252
+
253
+ - Visit http://localhost:4000 and see your React On Rails app running using the Webpack Dev server.
248
254
MSG
249
255
expect ( GeneratorMessages . output )
250
256
. to include ( GeneratorMessages . format_info ( expected ) )
251
257
end
252
258
253
259
specify "react with redux generator contains a helpful message" do
254
260
run_generator_test_with_args ( %w( --redux ) )
255
- expected = <<-MSG
256
- - Run the npm express-server command to load the node server with hot reloading support.
261
+ expected = <<-MSG . strip_heredoc
262
+
263
+ What to do next:
264
+
265
+ - Ensure your bundle and npm are up to date.
266
+
267
+ bundle && npm i
268
+
269
+ - Run the npm rails-server command to load the rails server.
270
+
271
+ npm run rails-server
272
+
273
+ - Visit http://localhost:3000/hello_world and see your React On Rails app running!
274
+
275
+ - Run the npm express-server command to load the node server with hot reloading support.
257
276
258
- npm run express-server
277
+ npm run express-server
259
278
260
- - Visit http://localhost:4000 and see your React On Rails app running using the Webpack Dev server.
279
+ - Visit http://localhost:4000 and see your React On Rails app running using the Webpack Dev server.
261
280
MSG
262
281
expect ( GeneratorMessages . output )
263
282
. to include ( GeneratorMessages . format_info ( expected ) )
You can’t perform that action at this time.
0 commit comments