Skip to content

Commit

Permalink
The bare clients now exist
Browse files Browse the repository at this point in the history
  • Loading branch information
MotorTruck1221 committed Apr 13, 2024
1 parent 8aba087 commit c015448
Show file tree
Hide file tree
Showing 34 changed files with 83 additions and 128 deletions.
13 changes: 11 additions & 2 deletions cli/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,23 @@
class RubyCLI < Thor
desc "start", "Start the server"
option :node, :type => :boolean
option :development, :type => :boolean
def start
if options[:node]
puts "Starting with node server...".red
system("node nodeJS/server.js --node-port=9294 &")
system("bundle exec puma -e production -q")
if options[:development]
system("bundle exec puma -e development")
else
system("bundle exec puma -e production -q")
end
else
puts "Starting the server...".red
system("bundle exec puma -e production -q")
if options[:development]
system("bundle exec puma -e development")
else
system("bundle exec puma -e production -q")
end
end
end
desc "create", "Create a new user"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"author": "Ruby Network",
"scripts": {
"preinstall": "npx -y only-allow pnpm",
"dev": "bundle exec rerun --ignore 'src/public/css/*' --ignore 'node_modules/*' --signal 'TERM' -c -w 5 --no-notify -- cli/cli.rb start",
"dev": "bundle exec rerun --ignore 'src/public/css/*' --ignore 'node_modules/*' --signal 'TERM' -c -w 5 --no-notify -- cli/cli.rb start --development --node",
"start": "bundle exec ruby cli/cli.rb start",
"install": "pnpm run build && bundle install",
"build:rh": "tsc -p ./rammerhead/tsconfig.json",
Expand Down
8 changes: 8 additions & 0 deletions ruby/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,11 @@ def showComponent(component)
File.read(File.join(settings.components, component + '.erb'))
end
end
def getExtension()
environment = ENV['RACK_ENV']
if environment == "development"
return "js"
elsif environment == "production"
return "js.min.js"
end
end
8 changes: 8 additions & 0 deletions src/public/js/bare.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ function bareChange(value) {
//uninstallAllSW()
}

function updateSw() {
navigator.serviceWorker.getRegistrations().then(function(registrations) {
for(let registration of registrations) {
registration.update();
}
});
}

function uninstallAllSW() {
navigator.serviceWorker.getRegistrations().then(function(registrations) {
for(let registration of registrations) {
Expand Down
1 change: 0 additions & 1 deletion src/public/js/bare.js.min.js

This file was deleted.

1 change: 0 additions & 1 deletion src/public/js/controls.js.min.js

This file was deleted.

1 change: 0 additions & 1 deletion src/public/js/games.js.min.js

This file was deleted.

1 change: 0 additions & 1 deletion src/public/js/index.js.min.js

This file was deleted.

1 change: 0 additions & 1 deletion src/public/js/keyBinds.js.min.js

This file was deleted.

1 change: 0 additions & 1 deletion src/public/js/notify.js.min.js

This file was deleted.

1 change: 0 additions & 1 deletion src/public/js/omnibox.js.min.js

This file was deleted.

1 change: 0 additions & 1 deletion src/public/js/pages.js.min.js

This file was deleted.

Loading

0 comments on commit c015448

Please sign in to comment.