-
Notifications
You must be signed in to change notification settings - Fork 373
Expand file tree
/
Copy pathdev
More file actions
executable file
·31 lines (28 loc) · 1.14 KB
/
dev
File metadata and controls
executable file
·31 lines (28 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env ruby
# frozen_string_literal: true
# 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")
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
# Main execution
ReactOnRails::Dev::ServerManager.run_from_command_line(ARGV)