-
Notifications
You must be signed in to change notification settings - Fork 378
Placeholder for upgrade PR #648
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
Procfile.dev-static → Procfile.dev-prod-assets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
Procfile.dev-static-assets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # You can run these commands in separate shells | ||
| web: bin/rails s -p 3000 | ||
| redis: redis-server | ||
|
|
||
| # Next line runs a watch process with webpack to compile the changed files. | ||
| # When making frequent changes to client side assets, you will prefer building webpack assets | ||
| # upon saving rather than when you refresh your browser page. | ||
| # Note, if using React on Rails localization you will need to run | ||
| # `bundle exec rake react_on_rails:locale` before you run bin/shakapacker | ||
| webpack: sh -c 'bundle exec rake react_on_rails:locale && rm -rf public/packs/* || true && bin/shakapacker -w' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 25 additions & 24 deletions
bin/dev
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,31 @@ | ||
| #!/usr/bin/env ruby | ||
| # frozen_string_literal: true | ||
|
|
||
| def installed?(process) | ||
| IO.popen "#{process} -v" | ||
| rescue Errno::ENOENT | ||
| false | ||
| end | ||
| # ReactOnRails Development Server | ||
| # | ||
| # This script provides a simple interface to the ReactOnRails development | ||
| # server management. The core logic is implemented in ReactOnRails::Dev | ||
| # classes for better maintainability and testing. | ||
| # | ||
| # Each command uses a specific Procfile for process management: | ||
| # - bin/dev (default/hmr): Uses Procfile.dev | ||
| # - bin/dev static: Uses Procfile.dev-static-assets-assets | ||
| # - bin/dev prod: Uses Procfile.dev-prod-assets | ||
| # | ||
| # To customize development environment: | ||
| # 1. Edit the appropriate Procfile to modify which processes run | ||
| # 2. Modify this script for project-specific command-line behavior | ||
| # 3. Extend ReactOnRails::Dev classes in your Rails app for advanced customization | ||
| # 4. Use classes directly: ReactOnRails::Dev::ServerManager.start(:development, "Custom.procfile") | ||
|
|
||
| def run(process) | ||
| system "#{process} start -f Procfile.dev" | ||
| rescue Errno::ENOENT | ||
| warn <<~MSG | ||
| ERROR: | ||
| Please ensure `Procfile.dev` exists in your project! | ||
| MSG | ||
| exit! | ||
| begin | ||
| require "bundler/setup" | ||
| require "react_on_rails/dev" | ||
| rescue LoadError | ||
| # Fallback for when gem is not yet installed | ||
| puts "Loading ReactOnRails development tools..." | ||
| require_relative "../../lib/react_on_rails/dev" | ||
| end | ||
|
|
||
| if installed? "overmind" | ||
| run "overmind" | ||
| elsif installed? "foreman" | ||
| run "foreman" | ||
| else | ||
| warn <<~MSG | ||
| NOTICE: | ||
| For this script to run, you need either 'overmind' or 'foreman' installed on your machine. Please try this script after installing one of them. | ||
| MSG | ||
| exit! | ||
| end | ||
| # Main execution | ||
| ReactOnRails::Dev::ServerManager.run_from_command_line(ARGV) |
30 changes: 0 additions & 30 deletions
bin/dev-static
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.