mirror of
https://onedev.site.tesses.net/crosslang/crosslangextras
synced 2026-02-08 17:15:45 +00:00
Change to onedev
This commit is contained in:
34
.onedev-buildspec.yml
Normal file
34
.onedev-buildspec.yml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
version: 38
|
||||||
|
jobs:
|
||||||
|
- name: Build for x86_64
|
||||||
|
steps:
|
||||||
|
- !CheckoutStep
|
||||||
|
name: Checkout
|
||||||
|
cloneCredential: !DefaultCredential {}
|
||||||
|
withLfs: true
|
||||||
|
withSubmodules: true
|
||||||
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
||||||
|
- !BuildImageStep
|
||||||
|
name: Build docker image
|
||||||
|
output: !RegistryOutput
|
||||||
|
tags: onedev.site.tesses.net/crosslang/crosslangextras/crosslangextras:latest
|
||||||
|
registryLogins:
|
||||||
|
- registryUrl: '@server_url@'
|
||||||
|
userName: '@job_token@'
|
||||||
|
passwordSecret: dockersecret
|
||||||
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
||||||
|
triggers:
|
||||||
|
- !DependencyFinishedTrigger
|
||||||
|
projects: crosslang
|
||||||
|
- !BranchUpdateTrigger
|
||||||
|
branches: master
|
||||||
|
projects: crosslang/crosslangextras
|
||||||
|
projectDependencies:
|
||||||
|
- projectPath: crosslang
|
||||||
|
buildProvider: !LastFinishedBuild
|
||||||
|
jobName: Build for x86_64
|
||||||
|
artifacts: -**
|
||||||
|
retryCondition: never
|
||||||
|
maxRetries: 3
|
||||||
|
retryDelay: 30
|
||||||
|
timeout: 14400
|
||||||
3
Dockerfile
Normal file
3
Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
FROM onedev.site.tesses.net/crosslang/crosslang:latest
|
||||||
|
|
||||||
|
RUN mkdir /src && cd /src && git clone https://onedev.site.tesses.net/crosslang/crosslangextras . && bash ./install.sh && cp Tesses.CrossLang.ShellPackage-1.0.0.0-prod.crvm /root/Tesses.CrossLang.ShellPackage-1.0.0.0-prod.crvm && cd / && rm -r /src
|
||||||
2
Templates/compiletool/.crossarchiveignore
Normal file
2
Templates/compiletool/.crossarchiveignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
bin
|
||||||
|
obj
|
||||||
16
Templates/compiletool/cross.json
Normal file
16
Templates/compiletool/cross.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "Tesses.CrossLang.Template.CompileTool",
|
||||||
|
"version": "1.0.0.0-prod",
|
||||||
|
"info": {
|
||||||
|
"maintainer": "Mike Nolan",
|
||||||
|
"type": "template",
|
||||||
|
"repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||||
|
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||||
|
"license": "MIT",
|
||||||
|
"template_name": "compiletool",
|
||||||
|
"template_info": {
|
||||||
|
"type": "compile_tool"
|
||||||
|
},
|
||||||
|
"template_ignored_files": ["bin","obj"]
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Templates/compiletool/src/main.tcross
Normal file
11
Templates/compiletool/src/main.tcross
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
func RunTool(cfg)
|
||||||
|
{
|
||||||
|
//cfg.Project is the project Subdirfilesystem
|
||||||
|
//cfg.ProjectInfo is the info property parsed from the cross.json file in project root
|
||||||
|
cfg.GeneratedSource.Add({
|
||||||
|
Source = "func times(a,b){return a * b;}",
|
||||||
|
FileName = "times.tcross"
|
||||||
|
});
|
||||||
|
|
||||||
|
//this runs with full access to vm so be careful when allowing these
|
||||||
|
}
|
||||||
2
Templates/console/.crossarchiveignore
Normal file
2
Templates/console/.crossarchiveignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
bin
|
||||||
|
obj
|
||||||
16
Templates/console/cross.json
Normal file
16
Templates/console/cross.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "Tesses.CrossLang.Template.Console",
|
||||||
|
"version": "1.0.0.0-prod",
|
||||||
|
"info": {
|
||||||
|
"maintainer": "Mike Nolan",
|
||||||
|
"type": "template",
|
||||||
|
"repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||||
|
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||||
|
"license": "MIT",
|
||||||
|
"template_name": "console",
|
||||||
|
"template_info": {
|
||||||
|
"type": "console"
|
||||||
|
},
|
||||||
|
"template_ignored_files": ["bin","obj"]
|
||||||
|
}
|
||||||
|
}
|
||||||
4
Templates/console/src/main.tcross
Normal file
4
Templates/console/src/main.tcross
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
func main(args)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Hello, world my name is: %PROJECT_NAME%");
|
||||||
|
}
|
||||||
2
Templates/lib/.crossarchiveignore
Normal file
2
Templates/lib/.crossarchiveignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
bin
|
||||||
|
obj
|
||||||
16
Templates/lib/cross.json
Normal file
16
Templates/lib/cross.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"name": "Tesses.CrossLang.Template.Library",
|
||||||
|
"version": "1.0.0.0-prod",
|
||||||
|
"info": {
|
||||||
|
"maintainer": "Mike Nolan",
|
||||||
|
"type": "template",
|
||||||
|
"repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||||
|
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||||
|
"license": "MIT",
|
||||||
|
"template_name": "lib",
|
||||||
|
"template_info": {
|
||||||
|
"type": "lib"
|
||||||
|
},
|
||||||
|
"template_ignored_files": ["bin","obj"]
|
||||||
|
}
|
||||||
|
}
|
||||||
5
Templates/lib/src/mylib.tcross
Normal file
5
Templates/lib/src/mylib.tcross
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/^ Multiply two numbers ^/
|
||||||
|
func MyLib.Times(a,b)
|
||||||
|
{
|
||||||
|
return a * b;
|
||||||
|
}
|
||||||
2
Templates/template/.crossarchiveignore
Normal file
2
Templates/template/.crossarchiveignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
bin
|
||||||
|
obj
|
||||||
25
Templates/template/cross.json
Normal file
25
Templates/template/cross.json
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"name": "Tesses.CrossLang.Template.Template",
|
||||||
|
"version": "1.0.0.0-prod",
|
||||||
|
"info": {
|
||||||
|
"maintainer": "Mike Nolan",
|
||||||
|
"type": "template",
|
||||||
|
"repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||||
|
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||||
|
"license": "MIT",
|
||||||
|
"template_name": "template",
|
||||||
|
"template_info": {
|
||||||
|
"type": "template",
|
||||||
|
"template_name": "mytemplate",
|
||||||
|
"template_project_dependencies": [],
|
||||||
|
"template_extra_text_ftles": [],
|
||||||
|
"template_info": {
|
||||||
|
"type": "console"
|
||||||
|
},
|
||||||
|
"template_ignored_files": ["bin","obj"]
|
||||||
|
},
|
||||||
|
"template_project_dependencies": [],
|
||||||
|
"template_extra_text_ftles": [],
|
||||||
|
"template_ignored_files": ["bin","obj"]
|
||||||
|
}
|
||||||
|
}
|
||||||
4
Templates/template/src/main.tcross
Normal file
4
Templates/template/src/main.tcross
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
func main(args)
|
||||||
|
{
|
||||||
|
//USE the string %TEMPLATE_PROJECT_NAME% anywhere you want to replace with the project name
|
||||||
|
}
|
||||||
2
Templates/web/.crossarchiveignore
Normal file
2
Templates/web/.crossarchiveignore
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
bin
|
||||||
|
obj
|
||||||
3
Templates/web/components/counter.tcrml
Normal file
3
Templates/web/components/counter.tcrml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<?component() name="Counter" ?>
|
||||||
|
<p>Count is <?expr count++ ?></p>
|
||||||
|
<?end?>
|
||||||
36
Templates/web/components/shell.tcrml
Normal file
36
Templates/web/components/shell.tcrml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?resource name="simple.min.css" route="/css/simple.min.css" ?>
|
||||||
|
<?resource name="favicon.ico" route="/favicon.ico" ?>
|
||||||
|
<?component(title,pages,body) name="Shell" ?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>%PROJECT_NAME% - <?expr Net.Http.HtmlEncode(title) ?></title>
|
||||||
|
<link rel="stylesheet" href="./css/simple.min.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>%PROJECT_NAME%</h1>
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<?code
|
||||||
|
each(var item : pages)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<li><a <?code if(item.active) { ?> aria-current="page" <?code } ?> href="<?expr Net.Http.UrlPathEncode(item.route) ?>"><?expr Net.Http.HtmlEncode(item.text) ?></a></li>
|
||||||
|
<?code
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
<h1><?expr Net.Http.HtmlEncode(title) ?></h1>
|
||||||
|
<?body?>
|
||||||
|
<?end?>
|
||||||
|
<footer>
|
||||||
|
<p>Created using <a href="https://crosslang.tesseslanguage.com/">CrossLang</a> and <a href="https://simplecss.org/">SimpleCSS</a></p>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
<?end?>
|
||||||
23
Templates/web/cross.json
Normal file
23
Templates/web/cross.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"name": "Tesses.CrossLang.Template.Website",
|
||||||
|
"version": "1.0.0.0-prod",
|
||||||
|
"info": {
|
||||||
|
"maintainer": "Mike Nolan",
|
||||||
|
"type": "template",
|
||||||
|
"repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||||
|
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||||
|
"license": "MIT",
|
||||||
|
"template_name": "web",
|
||||||
|
"template_info": {
|
||||||
|
"type": "console"
|
||||||
|
},
|
||||||
|
"template_project_dependencies": [
|
||||||
|
{
|
||||||
|
"name": "Tesses.CrossLang.Markup",
|
||||||
|
"version": "1.0.0.0-prod"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"template_extra_text_ftles": ["/components/shell.tcrml"],
|
||||||
|
"template_ignored_files": ["bin","obj"]
|
||||||
|
}
|
||||||
|
}
|
||||||
28
Templates/web/pages/about.tcrml
Normal file
28
Templates/web/pages/about.tcrml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?page() route="/about" ?>
|
||||||
|
<?code
|
||||||
|
var pages = [
|
||||||
|
{
|
||||||
|
active = false,
|
||||||
|
route = "/",
|
||||||
|
text = "Home"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
active = false,
|
||||||
|
route = "/counter",
|
||||||
|
text = "Counter"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
active = true,
|
||||||
|
route = "/about",
|
||||||
|
text = "About"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
?>
|
||||||
|
<?Shell?>
|
||||||
|
<?arg "About Me" ?>
|
||||||
|
<?arg pages ?>
|
||||||
|
<?arg_component() ?>
|
||||||
|
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Laboriosam possimus nisi ab nobis magni, error minus vero neque iusto beatae, quasi nostrum. Ut repudiandae expedita reprehenderit tenetur. Sunt, adipisci cumque!</p>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
29
Templates/web/pages/counter.tcrml
Normal file
29
Templates/web/pages/counter.tcrml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?page() route="/counter" ?>
|
||||||
|
<?code
|
||||||
|
var pages = [
|
||||||
|
{
|
||||||
|
active = false,
|
||||||
|
route = "/",
|
||||||
|
text = "Home"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
active = true,
|
||||||
|
route = "/counter",
|
||||||
|
text = "Counter"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
active = false,
|
||||||
|
route = "/about",
|
||||||
|
text = "About"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
?>
|
||||||
|
<?Shell?>
|
||||||
|
<?arg "Counter" ?>
|
||||||
|
<?arg pages ?>
|
||||||
|
<?arg_component() ?>
|
||||||
|
<?Counter ?>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
28
Templates/web/pages/index.tcrml
Normal file
28
Templates/web/pages/index.tcrml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?page() route="/" ?>
|
||||||
|
<?code
|
||||||
|
var pages = [
|
||||||
|
{
|
||||||
|
active = true,
|
||||||
|
route = "/",
|
||||||
|
text = "Home"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
active = false,
|
||||||
|
route = "/counter",
|
||||||
|
text = "Counter"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
active = false,
|
||||||
|
route = "/about",
|
||||||
|
text = "About"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
?>
|
||||||
|
<?Shell?>
|
||||||
|
<?arg "Main Page" ?>
|
||||||
|
<?arg pages ?>
|
||||||
|
<?arg_component() ?>
|
||||||
|
<p>1 John 4:4: You, dear children, are from God and have overcome them, because the one who is in you is greater than the one who is in the world.</p>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
BIN
Templates/web/res/favicon.ico
Executable file
BIN
Templates/web/res/favicon.ico
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
1
Templates/web/res/simple.min.css
vendored
Normal file
1
Templates/web/res/simple.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
5
Templates/web/src/program.tcross
Normal file
5
Templates/web/src/program.tcross
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
var count = 0;
|
||||||
|
func main(args)
|
||||||
|
{
|
||||||
|
Net.Http.ListenSimpleWithLoop(Router,4206);
|
||||||
|
}
|
||||||
3
Tesses.CrossLang.ExampleSite/components/counter.tcrml
Normal file
3
Tesses.CrossLang.ExampleSite/components/counter.tcrml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<?component() name="Counter" ?>
|
||||||
|
<p>Count is <?expr count++ ?></p>
|
||||||
|
<?end?>
|
||||||
36
Tesses.CrossLang.ExampleSite/components/shell.tcrml
Normal file
36
Tesses.CrossLang.ExampleSite/components/shell.tcrml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?resource name="simple.min.css" route="/css/simple.min.css" ?>
|
||||||
|
<?resource name="favicon.ico" route="/favicon.ico" ?>
|
||||||
|
<?component(title,pages,body) name="Shell" ?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>My Greater Website - <?expr Net.Http.HtmlEncode(title) ?></title>
|
||||||
|
<link rel="stylesheet" href="./css/simple.min.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>My Greater Website</h1>
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<?code
|
||||||
|
each(var item : pages)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<li><a <?code if(item.active) { ?> aria-current="page" <?code } ?> href="<?expr Net.Http.UrlPathEncode(item.route) ?>"><?expr Net.Http.HtmlEncode(item.text) ?></a></li>
|
||||||
|
<?code
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
<h1><?expr Net.Http.HtmlEncode(title) ?></h1>
|
||||||
|
<?body?>
|
||||||
|
<?end?>
|
||||||
|
<footer>
|
||||||
|
<p>Created using <a href="https://crosslang.tesseslanguage.com/">CrossLang</a> and <a href="https://simplecss.org/">SimpleCSS</a></p>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
<?end?>
|
||||||
10
Tesses.CrossLang.ExampleSite/cross.json
Normal file
10
Tesses.CrossLang.ExampleSite/cross.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"name": "Tesses.CrossLang.ExampleSite",
|
||||||
|
"version": "1.0.0.0-prod",
|
||||||
|
"project_dependencies": [
|
||||||
|
"../Tesses.CrossLang.Markup"
|
||||||
|
],
|
||||||
|
"info": {
|
||||||
|
"type": "console"
|
||||||
|
}
|
||||||
|
}
|
||||||
28
Tesses.CrossLang.ExampleSite/pages/about.tcrml
Normal file
28
Tesses.CrossLang.ExampleSite/pages/about.tcrml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?page() route="/about" ?>
|
||||||
|
<?code
|
||||||
|
var pages = [
|
||||||
|
{
|
||||||
|
active = false,
|
||||||
|
route = "/",
|
||||||
|
text = "Home"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
active = false,
|
||||||
|
route = "/counter",
|
||||||
|
text = "Counter"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
active = true,
|
||||||
|
route = "/about",
|
||||||
|
text = "About"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
?>
|
||||||
|
<?Shell?>
|
||||||
|
<?arg "About Me" ?>
|
||||||
|
<?arg pages ?>
|
||||||
|
<?arg_component() ?>
|
||||||
|
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Laboriosam possimus nisi ab nobis magni, error minus vero neque iusto beatae, quasi nostrum. Ut repudiandae expedita reprehenderit tenetur. Sunt, adipisci cumque!</p>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
29
Tesses.CrossLang.ExampleSite/pages/counter.tcrml
Normal file
29
Tesses.CrossLang.ExampleSite/pages/counter.tcrml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?page() route="/counter" ?>
|
||||||
|
<?code
|
||||||
|
var pages = [
|
||||||
|
{
|
||||||
|
active = false,
|
||||||
|
route = "/",
|
||||||
|
text = "Home"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
active = true,
|
||||||
|
route = "/counter",
|
||||||
|
text = "Counter"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
active = false,
|
||||||
|
route = "/about",
|
||||||
|
text = "About"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
?>
|
||||||
|
<?Shell?>
|
||||||
|
<?arg "Counter" ?>
|
||||||
|
<?arg pages ?>
|
||||||
|
<?arg_component() ?>
|
||||||
|
<?Counter ?>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
28
Tesses.CrossLang.ExampleSite/pages/index.tcrml
Normal file
28
Tesses.CrossLang.ExampleSite/pages/index.tcrml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?page() route="/" ?>
|
||||||
|
<?code
|
||||||
|
var pages = [
|
||||||
|
{
|
||||||
|
active = true,
|
||||||
|
route = "/",
|
||||||
|
text = "Home"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
active = false,
|
||||||
|
route = "/counter",
|
||||||
|
text = "Counter"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
active = false,
|
||||||
|
route = "/about",
|
||||||
|
text = "About"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
?>
|
||||||
|
<?Shell?>
|
||||||
|
<?arg "Main Page" ?>
|
||||||
|
<?arg pages ?>
|
||||||
|
<?arg_component() ?>
|
||||||
|
<p>1 John 4:4: You, dear children, are from God and have overcome them, because the one who is in you is greater than the one who is in the world.</p>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
BIN
Tesses.CrossLang.ExampleSite/res/favicon.ico
Executable file
BIN
Tesses.CrossLang.ExampleSite/res/favicon.ico
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
1
Tesses.CrossLang.ExampleSite/res/simple.min.css
vendored
Normal file
1
Tesses.CrossLang.ExampleSite/res/simple.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
5
Tesses.CrossLang.ExampleSite/src/program.tcross
Normal file
5
Tesses.CrossLang.ExampleSite/src/program.tcross
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
var count = 0;
|
||||||
|
func main(args)
|
||||||
|
{
|
||||||
|
Net.Http.ListenSimpleWithLoop(Router,4206);
|
||||||
|
}
|
||||||
3
Tesses.CrossLang.PackageServer/components/counter.tcrml
Normal file
3
Tesses.CrossLang.PackageServer/components/counter.tcrml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<?component() name="Counter" ?>
|
||||||
|
<p>Count is <?expr count++ ?></p>
|
||||||
|
<?end?>
|
||||||
36
Tesses.CrossLang.PackageServer/components/shell.tcrml
Normal file
36
Tesses.CrossLang.PackageServer/components/shell.tcrml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?resource name="simple.min.css" route="/css/simple.min.css" ?>
|
||||||
|
<?resource name="favicon.ico" route="/favicon.ico" ?>
|
||||||
|
<?component(title,pages,body) name="Shell" ?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Tesses.CrossLang.PackageServer - <?expr Net.Http.HtmlEncode(title) ?></title>
|
||||||
|
<link rel="stylesheet" href="./css/simple.min.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<h1>Tesses.CrossLang.PackageServer</h1>
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<?code
|
||||||
|
each(var item : pages)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<li><a <?code if(item.active) { ?> aria-current="page" <?code } ?> href="<?expr Net.Http.UrlPathEncode(item.route) ?>"><?expr Net.Http.HtmlEncode(item.text) ?></a></li>
|
||||||
|
<?code
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
<h1><?expr Net.Http.HtmlEncode(title) ?></h1>
|
||||||
|
<?body?>
|
||||||
|
<?end?>
|
||||||
|
<footer>
|
||||||
|
<p>Created using <a href="https://crosslang.tesseslanguage.com/">CrossLang</a> and <a href="https://simplecss.org/">SimpleCSS</a></p>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
<?end?>
|
||||||
28
Tesses.CrossLang.PackageServer/pages/about.tcrml
Normal file
28
Tesses.CrossLang.PackageServer/pages/about.tcrml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?page() route="/about" ?>
|
||||||
|
<?code
|
||||||
|
var pages = [
|
||||||
|
{
|
||||||
|
active = false,
|
||||||
|
route = "/",
|
||||||
|
text = "Home"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
active = false,
|
||||||
|
route = "/counter",
|
||||||
|
text = "Counter"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
active = true,
|
||||||
|
route = "/about",
|
||||||
|
text = "About"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
?>
|
||||||
|
<?Shell?>
|
||||||
|
<?arg "About Me" ?>
|
||||||
|
<?arg pages ?>
|
||||||
|
<?arg_component() ?>
|
||||||
|
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Laboriosam possimus nisi ab nobis magni, error minus vero neque iusto beatae, quasi nostrum. Ut repudiandae expedita reprehenderit tenetur. Sunt, adipisci cumque!</p>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
29
Tesses.CrossLang.PackageServer/pages/counter.tcrml
Normal file
29
Tesses.CrossLang.PackageServer/pages/counter.tcrml
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<?page() route="/counter" ?>
|
||||||
|
<?code
|
||||||
|
var pages = [
|
||||||
|
{
|
||||||
|
active = false,
|
||||||
|
route = "/",
|
||||||
|
text = "Home"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
active = true,
|
||||||
|
route = "/counter",
|
||||||
|
text = "Counter"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
active = false,
|
||||||
|
route = "/about",
|
||||||
|
text = "About"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
?>
|
||||||
|
<?Shell?>
|
||||||
|
<?arg "Counter" ?>
|
||||||
|
<?arg pages ?>
|
||||||
|
<?arg_component() ?>
|
||||||
|
<?Counter ?>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
|
<?end?>
|
||||||
BIN
Tesses.CrossLang.PackageServer/res/favicon.ico
Normal file
BIN
Tesses.CrossLang.PackageServer/res/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
1
Tesses.CrossLang.PackageServer/res/simple.min.css
vendored
Normal file
1
Tesses.CrossLang.PackageServer/res/simple.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
Tesses.CrossLang.RpcServer/cross.json
Normal file
7
Tesses.CrossLang.RpcServer/cross.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"info": {
|
||||||
|
"type": "console"
|
||||||
|
},
|
||||||
|
"version": "1.0.0.0-prod",
|
||||||
|
"name": "Tesses.CrossLang.RpcServer"
|
||||||
|
}
|
||||||
4
Tesses.CrossLang.RpcServer/src/main.tcross
Normal file
4
Tesses.CrossLang.RpcServer/src/main.tcross
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
func main(args)
|
||||||
|
{
|
||||||
|
Net.Http.ListenSimpleWithLoop(Router,4206);
|
||||||
|
}
|
||||||
7
crosslang_shell_archive_maker/cross.json
Normal file
7
crosslang_shell_archive_maker/cross.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"info": {
|
||||||
|
"type": "console"
|
||||||
|
},
|
||||||
|
"version": "1.0.0.0-prod",
|
||||||
|
"name": "crosslang_shell_archive_maker"
|
||||||
|
}
|
||||||
80
crosslang_shell_archive_maker/src/main.tcross
Normal file
80
crosslang_shell_archive_maker/src/main.tcross
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
|
||||||
|
var name = "Tesses.CrossLang.ShellPackage-1.0.0.0-prod.crvm";
|
||||||
|
func main(args)
|
||||||
|
{
|
||||||
|
create_archive();
|
||||||
|
if(args.Count > 1 && args[1] == "install")
|
||||||
|
{
|
||||||
|
install();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func install()
|
||||||
|
{
|
||||||
|
var d = FS.MakeFull(Env.Config) / "Tesses" / "CrossLang";
|
||||||
|
FS.Local.CreateDirectory(d);
|
||||||
|
var sdfs = FS.SubdirFilesystem(FS.Local, d);
|
||||||
|
var strm = FS.Local.OpenFile(name,"rb");
|
||||||
|
FS.ExtractArchive(strm, sdfs);
|
||||||
|
sdfs.Close();
|
||||||
|
strm.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
func create_archive()
|
||||||
|
{
|
||||||
|
|
||||||
|
var tmpFS = FS.SubdirFilesystem(FS.Local,"crosslang_shell_archive_maker/tmp");
|
||||||
|
func copyFile(src,dest)
|
||||||
|
{
|
||||||
|
if(!FS.Local.FileExists(src)) return;
|
||||||
|
var srcF = FS.Local.OpenFile(src,"rb");
|
||||||
|
var destF = tmpFS.OpenFile(dest,"wb");
|
||||||
|
srcF.CopyTo(destF);
|
||||||
|
srcF.Close();
|
||||||
|
destF.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
var r = Path.Root();
|
||||||
|
|
||||||
|
var shell = r / "Shell";
|
||||||
|
|
||||||
|
|
||||||
|
tmpFS.CreateDirectory(shell);
|
||||||
|
|
||||||
|
copyFile("Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Args-1.0.0.0-prod.crvm", shell / "Tesses.CrossLang.Args-1.0.0.0-prod.crvm");
|
||||||
|
copyFile("Tesses.CrossLang.Shell/bin/Tesses.CrossLang.BuildEssentials-1.0.0.0-prod.crvm", shell / "Tesses.CrossLang.BuildEssentials-1.0.0.0-prod.crvm");
|
||||||
|
copyFile("Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-prod.crvm", shell / "Shell.crvm");
|
||||||
|
|
||||||
|
var templates = r / "Templates";
|
||||||
|
tmpFS.CreateDirectory(templates);
|
||||||
|
copyFile("Templates/compiletool/bin/Tesses.CrossLang.Template.CompileTool-1.0.0.0-prod.crvm", templates / "compiletool.crvm");
|
||||||
|
copyFile("Templates/console/bin/Tesses.CrossLang.Template.Console-1.0.0.0-prod.crvm", templates / "console.crvm");
|
||||||
|
copyFile("Templates/lib/bin/Tesses.CrossLang.Template.Library-1.0.0.0-prod.crvm", templates / "lib.crvm");
|
||||||
|
copyFile("Templates/template/bin/Tesses.CrossLang.Template.Template-1.0.0.0-prod.crvm", templates / "template.crvm");
|
||||||
|
copyFile("Templates/web/bin/Tesses.CrossLang.Template.Website-1.0.0.0-prod.crvm", templates / "web.crvm");
|
||||||
|
var packageCache = r / "PackageCache";
|
||||||
|
|
||||||
|
tmpFS.CreateDirectory(packageCache);
|
||||||
|
tmpFS.CreateDirectory(packageCache / "Tesses.CrossLang.Args");
|
||||||
|
tmpFS.CreateDirectory(packageCache / "Tesses.CrossLang.BuildEssentials");
|
||||||
|
tmpFS.CreateDirectory(packageCache / "Tesses.CrossLang.Markup");
|
||||||
|
copyFile("Tesses.CrossLang.Args/bin/Tesses.CrossLang.Args-1.0.0.0-prod.crvm", packageCache / "Tesses.CrossLang.Args" / "1.0.0.0-prod");
|
||||||
|
copyFile("Tesses.CrossLang.BuildEssentials/bin/Tesses.CrossLang.BuildEssentials-1.0.0.0-prod.crvm", packageCache / "Tesses.CrossLang.BuildEssentials" / "1.0.0.0-prod");
|
||||||
|
copyFile("Tesses.CrossLang.Markup/bin/Tesses.CrossLang.Markup-1.0.0.0-prod.crvm", packageCache / "Tesses.CrossLang.Markup" / "1.0.0.0-prod");
|
||||||
|
|
||||||
|
var installer = FS.Local.OpenFile(name, "wb");
|
||||||
|
|
||||||
|
var ifo = {
|
||||||
|
type = "archive",
|
||||||
|
maintainer = "Mike Nolan",
|
||||||
|
repo = "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||||
|
homepage = "https://crosslang.tesseslanguage.com/"
|
||||||
|
};
|
||||||
|
|
||||||
|
FS.CreateArchive(tmpFS,installer, "Tesses.CrossLang.ShellPackage","1.0.0.0-prod", Json.Encode(ifo));
|
||||||
|
|
||||||
|
installer.Close();
|
||||||
|
tmpFS.Close();
|
||||||
|
|
||||||
|
FS.Local.DeleteDirectroyRecurse("crosslang_shell_archive_maker/tmp");
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user