Skip to content

Commit a800ba8

Browse files
committed
Update Base Generator Helpful Message
- Add info for hot reloading server npm cmd. - Remove duplicate code from redux generator helpful msg because base now prints the same msg. - Update tests to reflect changes. - Update CHANGELOG.
1 parent f2585e3 commit a800ba8

File tree

4 files changed

+35
-16
lines changed

4 files changed

+35
-16
lines changed

CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. Items under
44
Contributors: please follow the recommendations outlined at [keepachangelog.com](http://keepachangelog.com/). Please use the existing headings and styling as a guide, and add a link for the version diff at the bottom of the file. Also, please update the `Unreleased` link to compare to the latest release version.
55
## [Unreleased]
66

7+
## [3.0.2] - 2016-02-15
8+
##### Fixed
9+
- Fixed missing information in the helpful message after running the base install generator regarding how to run the node server with hot reloading support.
10+
711
## [3.0.1] - 2016-02-15
812
##### Fixed
913
- Fixed several jscs linter issues.
@@ -169,7 +173,8 @@ Best done with Object destructing:
169173

170174
##### Fixed
171175
- Fix several generator related issues.
172-
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/3.0.1...master
176+
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/3.0.2...master
177+
[3.0.2]: https://github.com/shakacode/react_on_rails/compare/3.0.1...3.0.2
173178
[3.0.1]: https://github.com/shakacode/react_on_rails/compare/3.0.0...3.0.1
174179
[3.0.0]: https://github.com/shakacode/react_on_rails/compare/2.3.0...3.0.0
175180
[2.3.0]: https://github.com/shakacode/react_on_rails/compare/2.2.0...2.3.0

lib/generators/react_on_rails/base_generator.rb

+6
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,12 @@ def print_helpful_message
207207
npm run rails-server
208208
209209
- 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.
210216
MSG
211217
GeneratorMessages.add_info(message)
212218
end

lib/generators/react_on_rails/react_with_redux_generator.rb

-11
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,6 @@ def template_appropriate_version_of_hello_world_app_client
4545
location = "client/app/bundles/HelloWorld/startup"
4646
template("redux/base/#{location}/HelloWorldAppClient.jsx.tt", "#{location}/#{filename}")
4747
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
5948
end
6049
end
6150
end

spec/react_on_rails/generators/install_generator_spec.rb

+23-4
Original file line numberDiff line numberDiff line change
@@ -245,19 +245,38 @@
245245
npm run rails-server
246246
247247
- 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.
248254
MSG
249255
expect(GeneratorMessages.output)
250256
.to include(GeneratorMessages.format_info(expected))
251257
end
252258

253259
specify "react with redux generator contains a helpful message" do
254260
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.
257276
258-
npm run express-server
277+
npm run express-server
259278
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.
261280
MSG
262281
expect(GeneratorMessages.output)
263282
.to include(GeneratorMessages.format_info(expected))

0 commit comments

Comments
 (0)