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:
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);
|
||||
}
|
||||
Reference in New Issue
Block a user