Skip to content

Commit

Permalink
typo and remove obsolete codes
Browse files Browse the repository at this point in the history
  • Loading branch information
UlyssesZh committed Aug 4, 2024
1 parent 91feedd commit f170ea6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions lib/sscharter/chart.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Sunniesnow::Chart
attr_accessor :difficulty_name, :difficulty_color, :difficulty, :difficulty_sup
attr_reader :events

def initialize live_reload_port: 31108, production: false, live_restart: false
def initialize live_reload_port: 31108, production: false
@title = ''
@artist = ''
@charter = ''
Expand All @@ -21,7 +21,6 @@ def initialize live_reload_port: 31108, production: false, live_restart: false
@events = []
@live_reload_port = live_reload_port
@production = production
@live_restart = live_restart
end

def to_json *args
Expand All @@ -37,8 +36,7 @@ def to_json *args
}
hash[:sscharter] = {
version: Sunniesnow::Charter::VERSION,
port: @live_reload_port,
liveRestart: @live_restart
port: @live_reload_port
} unless @production
hash.to_json
end
Expand Down
4 changes: 2 additions & 2 deletions lib/sscharter/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ def build **opts
o.on '--host=HOST', String, 'Host name'
o.on '--exposed-host=HOST', String, 'Exposed host name'
o.on '--port=PORT', Integer, 'Port number'
o.on '--live-reload-port=PORT', Integer, 'live_reload port number'
o.on '--[no-]production', 'Disable live_reload'
o.on '--live-reload-port=PORT', Integer, 'live reload port number'
o.on '--[no-]production', 'Disable live reload'
o.on '--[no-]open-browser', 'Open browser'
end
Sunniesnow::Charter::CLI::Subcommand.new :serve, option_parser do |host: '0.0.0.0', exposed_host: 'localhost', port: 8011, live_reload_port: 31108, production: false, open_browser: true|
Expand Down

0 comments on commit f170ea6

Please sign in to comment.