mirror of
https://onedev.site.tesses.net/crosslang/crosslangextras
synced 2026-02-08 17:15:45 +00:00
Add filter to package server and fix templates for devstudio
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
"template_info": {
|
||||
"type": "compile_tool"
|
||||
},
|
||||
"template_name_pretty": "Compile Tool",
|
||||
"template_ignored_files": ["bin","obj"],
|
||||
"description": "A tool that can be a dependency to a project (including libraries) that runs at compile time"
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
"template_info": {
|
||||
"type": "console"
|
||||
},
|
||||
"template_name_pretty": "Console Application",
|
||||
"template_ignored_files": ["bin","obj"],
|
||||
"description": "A console application"
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"template_info": {
|
||||
"type": "console"
|
||||
},
|
||||
"template_name_pretty": "Empty Website",
|
||||
"template_extra_text_ftles": [],
|
||||
"template_ignored_files": ["bin","obj"]
|
||||
}
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
"Child": {
|
||||
"Type": "AbsoluteView",
|
||||
"Items": [
|
||||
{
|
||||
"Bounds": {
|
||||
"X": 42,
|
||||
"Y": 42,
|
||||
"Width": 200,
|
||||
"Height": 50
|
||||
},
|
||||
"Type": "ButtonView",
|
||||
"Text": "Click Me",
|
||||
"Id": "btn1",
|
||||
"Active": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"Palette": {
|
||||
"IsDarkMode": true,
|
||||
"Accent": "#DB0",
|
||||
"Border": "#040",
|
||||
"BorderActive":"#A00",
|
||||
"BorderHover": "#00A",
|
||||
"BorderHoverActive": "#A0A",
|
||||
"FontSize": 20
|
||||
},
|
||||
"Size": {
|
||||
"Width": 640,
|
||||
"Height": 480
|
||||
},
|
||||
"Text": "%PROJECT_NAME%"
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
func btn1_Click(sender,e)
|
||||
{
|
||||
Console.WriteLine("Button Clicked");
|
||||
}
|
||||
func main(args)
|
||||
{
|
||||
if(TypeOf(GUI) != "Dictionary")
|
||||
{
|
||||
Console.WriteLine("The GUI is not supported, please build tessesframework with TESSESFRAMEWORK_ENABLE_SDL2.");
|
||||
return 1;
|
||||
}
|
||||
var window = GUI.Window.FromJSON(embed("layout.json"), SDL2.Window.Resizable);
|
||||
var btn1 = window.FindViewById("btn1");
|
||||
btn1.Click += btn1_Click;
|
||||
VM.RunEventLoop();
|
||||
btn.Click -= btn1_Click;
|
||||
window.Dispose(); //we need to destroy it or it will leak
|
||||
}
|
||||
@@ -12,6 +12,7 @@
|
||||
"type": "lib"
|
||||
},
|
||||
"template_ignored_files": ["bin","obj"],
|
||||
"description": "A crosslang library"
|
||||
"description": "A crosslang library",
|
||||
"template_name_pretty": "Library"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
},
|
||||
"template_project_dependencies": [],
|
||||
"template_extra_text_ftles": [],
|
||||
"template_ignored_files": ["bin","obj"]
|
||||
"template_ignored_files": ["bin","obj"],
|
||||
"template_name_pretty": "Template"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,5 +21,6 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"version": "1.0.0.0-prod",
|
||||
"name": "Tesses.CrossLang.Template.Tool"
|
||||
"name": "Tesses.CrossLang.Template.Tool",
|
||||
"template_name_pretty": "Tool"
|
||||
}
|
||||
@@ -13,5 +13,6 @@
|
||||
"type": "console"
|
||||
},
|
||||
"template_ignored_files": ["bin","obj"]
|
||||
}
|
||||
},
|
||||
"template_name_pretty": "WebSite"
|
||||
}
|
||||
|
||||
@@ -2,25 +2,24 @@
|
||||
"dependencies": [
|
||||
],
|
||||
"info": {
|
||||
"template_extra_text_ftles": [
|
||||
"res/layout.json"
|
||||
],
|
||||
|
||||
"template_ignored_files": [
|
||||
"bin",
|
||||
"obj"
|
||||
],
|
||||
"template_info": {
|
||||
"type": "app",
|
||||
"type": "webapp",
|
||||
"license": "MIT"
|
||||
},
|
||||
"template_name": "gui",
|
||||
"template_name": "webapp",
|
||||
"template_name_pretty": "Web Application",
|
||||
"template_project_dependencies": [
|
||||
],
|
||||
"repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||
"type": "template",
|
||||
"description": "A crosslang gui, using tesses-framework's gui library"
|
||||
"description": "A web app (for webview or eventual cloud OS)"
|
||||
},
|
||||
"name": "Tesses.CrossLang.Template.GUI",
|
||||
"name": "Tesses.CrossLang.Template.WebApp",
|
||||
"version": "1.0.0.0-prod"
|
||||
}
|
||||
12
Templates/webapp/src/main.tcross
Normal file
12
Templates/webapp/src/main.tcross
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
func WebAppMain(args)
|
||||
{
|
||||
return (ctx)=>{
|
||||
if(ctx.Path == "/")
|
||||
{
|
||||
ctx.WithMimeType("text/html").SendText(<h1>Hello, world</h1>);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user