Skip to content

Commit

Permalink
Merge pull request #279 from aaronvb/add_npm_express_server_to_genera…
Browse files Browse the repository at this point in the history
…tor_message

Update Base Generator Helpful Message
  • Loading branch information
justin808 committed Feb 16, 2016
2 parents f2585e3 + a800ba8 commit 1b71714
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 16 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. Items under
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.
## [Unreleased]

## [3.0.2] - 2016-02-15
##### Fixed
- Fixed missing information in the helpful message after running the base install generator regarding how to run the node server with hot reloading support.

## [3.0.1] - 2016-02-15
##### Fixed
- Fixed several jscs linter issues.
Expand Down Expand Up @@ -169,7 +173,8 @@ Best done with Object destructing:

##### Fixed
- Fix several generator related issues.
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/3.0.1...master
[Unreleased]: https://github.com/shakacode/react_on_rails/compare/3.0.2...master
[3.0.2]: https://github.com/shakacode/react_on_rails/compare/3.0.1...3.0.2
[3.0.1]: https://github.com/shakacode/react_on_rails/compare/3.0.0...3.0.1
[3.0.0]: https://github.com/shakacode/react_on_rails/compare/2.3.0...3.0.0
[2.3.0]: https://github.com/shakacode/react_on_rails/compare/2.2.0...2.3.0
Expand Down
6 changes: 6 additions & 0 deletions lib/generators/react_on_rails/base_generator.rb
Expand Up @@ -207,6 +207,12 @@ def print_helpful_message
npm run rails-server
- Visit http://localhost:3000/hello_world and see your React On Rails app running!
- Run the npm express-server command to load the node server with hot reloading support.
npm run express-server
- Visit http://localhost:4000 and see your React On Rails app running using the Webpack Dev server.
MSG
GeneratorMessages.add_info(message)
end
Expand Down
11 changes: 0 additions & 11 deletions lib/generators/react_on_rails/react_with_redux_generator.rb
Expand Up @@ -45,17 +45,6 @@ def template_appropriate_version_of_hello_world_app_client
location = "client/app/bundles/HelloWorld/startup"
template("redux/base/#{location}/HelloWorldAppClient.jsx.tt", "#{location}/#{filename}")
end

def print_helpful_message
message = <<-MSG
- Run the npm express-server command to load the node server with hot reloading support.
npm run express-server
- Visit http://localhost:4000 and see your React On Rails app running using the Webpack Dev server.
MSG
GeneratorMessages.add_info(message)
end
end
end
end
27 changes: 23 additions & 4 deletions spec/react_on_rails/generators/install_generator_spec.rb
Expand Up @@ -245,19 +245,38 @@
npm run rails-server
- Visit http://localhost:3000/hello_world and see your React On Rails app running!
- Run the npm express-server command to load the node server with hot reloading support.
npm run express-server
- Visit http://localhost:4000 and see your React On Rails app running using the Webpack Dev server.
MSG
expect(GeneratorMessages.output)
.to include(GeneratorMessages.format_info(expected))
end

specify "react with redux generator contains a helpful message" do
run_generator_test_with_args(%w(--redux))
expected = <<-MSG
- Run the npm express-server command to load the node server with hot reloading support.
expected = <<-MSG.strip_heredoc
What to do next:
- Ensure your bundle and npm are up to date.
bundle && npm i
- Run the npm rails-server command to load the rails server.
npm run rails-server
- Visit http://localhost:3000/hello_world and see your React On Rails app running!
- Run the npm express-server command to load the node server with hot reloading support.
npm run express-server
npm run express-server
- Visit http://localhost:4000 and see your React On Rails app running using the Webpack Dev server.
- Visit http://localhost:4000 and see your React On Rails app running using the Webpack Dev server.
MSG
expect(GeneratorMessages.output)
.to include(GeneratorMessages.format_info(expected))
Expand Down

0 comments on commit 1b71714

Please sign in to comment.