Skip to content

Commit c015448

Browse files
The bare clients now exist
1 parent 8aba087 commit c015448

34 files changed

+83
-128
lines changed

cli/cli.rb

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,23 @@
1919
class RubyCLI < Thor
2020
desc "start", "Start the server"
2121
option :node, :type => :boolean
22+
option :development, :type => :boolean
2223
def start
2324
if options[:node]
2425
puts "Starting with node server...".red
2526
system("node nodeJS/server.js --node-port=9294 &")
26-
system("bundle exec puma -e production -q")
27+
if options[:development]
28+
system("bundle exec puma -e development")
29+
else
30+
system("bundle exec puma -e production -q")
31+
end
2732
else
2833
puts "Starting the server...".red
29-
system("bundle exec puma -e production -q")
34+
if options[:development]
35+
system("bundle exec puma -e development")
36+
else
37+
system("bundle exec puma -e production -q")
38+
end
3039
end
3140
end
3241
desc "create", "Create a new user"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"author": "Ruby Network",
77
"scripts": {
88
"preinstall": "npx -y only-allow pnpm",
9-
"dev": "bundle exec rerun --ignore 'src/public/css/*' --ignore 'node_modules/*' --signal 'TERM' -c -w 5 --no-notify -- cli/cli.rb start",
9+
"dev": "bundle exec rerun --ignore 'src/public/css/*' --ignore 'node_modules/*' --signal 'TERM' -c -w 5 --no-notify -- cli/cli.rb start --development --node",
1010
"start": "bundle exec ruby cli/cli.rb start",
1111
"install": "pnpm run build && bundle install",
1212
"build:rh": "tsc -p ./rammerhead/tsconfig.json",

ruby/utils.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,11 @@ def showComponent(component)
2020
File.read(File.join(settings.components, component + '.erb'))
2121
end
2222
end
23+
def getExtension()
24+
environment = ENV['RACK_ENV']
25+
if environment == "development"
26+
return "js"
27+
elsif environment == "production"
28+
return "js.min.js"
29+
end
30+
end

src/public/js/bare.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ function bareChange(value) {
3232
//uninstallAllSW()
3333
}
3434

35+
function updateSw() {
36+
navigator.serviceWorker.getRegistrations().then(function(registrations) {
37+
for(let registration of registrations) {
38+
registration.update();
39+
}
40+
});
41+
}
42+
3543
function uninstallAllSW() {
3644
navigator.serviceWorker.getRegistrations().then(function(registrations) {
3745
for(let registration of registrations) {

src/public/js/bare.js.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/public/js/controls.js.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/public/js/games.js.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/public/js/index.js.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/public/js/keyBinds.js.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/public/js/notify.js.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)