Merge branch 'master' into forall-change

This commit is contained in:
rheidner 2021-08-19 23:01:44 -03:00
commit 858ca9177c
9 changed files with 52 additions and 18 deletions

1
.gitignore vendored
View File

@ -20,3 +20,4 @@ web/events/data/*
.cache
/.gtm/
web/docs
.env

View File

@ -228,7 +228,7 @@ App.KL.Lobby.draw.front(user: String, room_input: String, global: App.KL.Global.
"flex-wrap": "wrap",
"text-align": "center"
}>
"Enter a room number: "
"Room number: "
{App.KL.Lobby.draw.front.input("text", room_input)}
<div>
{App.KL.Lobby.draw.front.button("ready", "Enter")}
@ -236,6 +236,16 @@ App.KL.Lobby.draw.front(user: String, room_input: String, global: App.KL.Global.
{App.KL.Lobby.draw.front.button("heroes", "Heroes")}
</div>
</div>
<pre style={"margin-top": "30px", "font-size": "medium", "text-align": "start"}>
"Hello! To start with Kaelin it's easy.
1. Enter a random room number and copy it
2. Invite your friends to access: http://uwu.tech/App.KL
3. Share the room number with them
Enjoy our little Kind game! (WIP)
We will love to hear about your experience <3
Join us: http://discord.gg/SNhNx9gUgh "
</pre>
</div>
// Lobby.When

BIN
base/kind-scm Normal file

Binary file not shown.

View File

@ -1,6 +1,6 @@
{
"name": "kind-lang",
"version": "1.0.91",
"version": "1.0.92",
"description": "Kind-Lang in JavaScript",
"main": "src/kind.js",
"scripts": {

View File

@ -1,4 +1,4 @@
#!/usr/bin/env node
#!/usr/bin/env -S node --stack-size=100000
var kind = require("./kind.js");
var fs = require("fs");

View File

@ -2,6 +2,7 @@
var fs = require("fs");
var {exec, execSync} = require("child_process");
require('dotenv/config');
var code_dir = __dirname+"/src";
var kind_dir = __dirname+"/../base";
@ -13,21 +14,25 @@ var all_js_apps = fs.readdirSync("apps").filter(x => x.startsWith("App."));
process.chdir(kind_dir);
var all_kind_apps = fs.readdirSync("App").filter(x => x.slice(-5) === ".kind");
// console.log(all_kind_apps)
// var all_kind_apps = [
// 'Browser.kind',
// 'Hello.kind',
// 'Kind.kind',
// 'KL.kind',
// 'Playground.kind',
// 'Pong.kind',
// 'Seta.kind',
// 'TicTacToe.kind'
// ]
// App that will be displayed when accessing http://uwu.tech
var server_apps = [
'Browser.kind',
'Hello.kind',
'Kind.kind',
'KL.kind',
'Playground.kind',
'Pong.kind',
'Seta.kind',
'TicTacToe.kind'
]
var app = "";
var compiled_apps = [];
console.log("[1/2] Compiling apps:")
const build_server = process.env.PRODUCTION;
if (process.argv[2]) { // Only build 1 App
app = all_kind_apps.filter(name => {
const match = process.argv[2].toLowerCase().slice(4) // remove "App."
@ -41,7 +46,8 @@ if (process.argv[2]) { // Only build 1 App
}
} else { // Build all Apps
console.log("Tip: to build only 1 app, use \x1b[2mnode build.js app_name\x1b[0m.")
for (var file of all_kind_apps) {
const apps = build_server ? server_apps : all_kind_apps;
for (var file of apps) {
compiled_apps.push(compile_app(file));
}
}
@ -72,9 +78,19 @@ if (app !== "" && app !== undefined) { // Check if need to add App to the export
const app_export_format = "App."+app.slice(0,-5)+".js";
if (all_js_apps.includes(app_export_format)) all_js_apps.concat(app_export_format);
}
const formatted_server_app = (app) => app.slice(4).slice(0, -3) + ".kind";
// Define which Apps will be on index.js file
const apps_in_index =
build_server
? all_js_apps.filter((app) => server_apps.includes(formatted_server_app(app)))
: all_js_apps;
// Order Apps alphabetically
all_js_apps.sort((a, b) => a.localeCompare(b))
for (var app of all_js_apps ) {
apps_in_index.sort((a, b) => a.localeCompare(b))
for (var app of apps_in_index ) {
index += add_line(app);
}
index += "}\n";

View File

@ -9,6 +9,7 @@
"license": "MIT",
"description": "",
"dependencies": {
"dotenv": "^10.0.0",
"formcore-js": "^0.1.76",
"inferno": "^7.4.6",
"inferno-hyperscript": "^7.4.6",

View File

@ -25,7 +25,7 @@ module.exports = class AppList extends Component {
"font-family": "monospace",
}
}, [
h("div", {}, [h("pre", {}, ["Select an application:"])]),
h("div", {}, [h("pre", {style: {"margin-bottom": "10px"}}, ["Select an application:"])]),
list,
]);
}

View File

@ -46,7 +46,13 @@ class Moonad extends Component {
render() {
var path = window.location.pathname.slice(1);
if (path === "") {
return h(AppList);
return h("div", {style: {"padding": "10px"}}, [
h(AppList),
h("div", {style: {"margin": "10px 20px"}}, [
h("p", {}, "To the newcomers: want to play a MOBA-like game with turns? Select App.KL and follow the instructions UwU")
])
])
;
} else {
return h(AppPlay, {
name: path,