mirror of
https://git.tesses.org/tesses50/crosslangextras.git
synced 2026-09-30 15:44:15 +00:00
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31092cca8e | ||
|
|
7558a3a8e1 | ||
|
|
175105c807 | ||
|
|
dbe5e137fe | ||
|
|
3e5932b2ad | ||
|
|
0459b0a84e |
@@ -13,23 +13,22 @@ env:
|
||||
|
||||
jobs:
|
||||
build-crosslang-shell-and-cpkg:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: arch-builder
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: |
|
||||
wget -O /root/repository.key https://git.tesses.org/api/packages/tesses50/arch/repository.key
|
||||
pacman-key --add /root/repository.key
|
||||
printf "[tesses50.git.tesses.org]\nSigLevel = Optional TrustAll\nServer = https://git.tesses.org/api/packages/tesses50/arch/core/\$arch\n" >> /etc/pacman.conf
|
||||
pacman --noconfirm -Sy crosslang
|
||||
cd vscode-extension
|
||||
npm install
|
||||
npm install -g typescript
|
||||
npm install -g @vscode/vsce
|
||||
vsce package
|
||||
cd ..
|
||||
wget -O /usr/local/bin/crosslang https://redirect.tesses.net/cl-slim-x86_64-linux-musl
|
||||
chmod 755 /usr/local/bin/crosslang
|
||||
ln -s /usr/local/bin/crosslang /usr/local/bin/crossc
|
||||
ln -s /usr/local/bin/crosslang /usr/local/bin/crossint
|
||||
ln -s /usr/local/bin/crosslang /usr/local/bin/crossvm
|
||||
crossint ./build.tcross pack
|
||||
crossint ./build.tcross install
|
||||
crosslang int ./build.tcross pack
|
||||
crosslang int ./build.tcross install
|
||||
mkdir -p artifacts
|
||||
cp Tesses.CrossLang.ShellPackage-*.crvm artifacts/ShellPackage.crvm
|
||||
cp Tesses.CrossLang.PackageServer/bin/Tesses.CrossLang.PackageServer-*.crvm artifacts/CPKG.crvm
|
||||
@@ -59,6 +58,12 @@ jobs:
|
||||
crosslang upload-package --token="${{ secrets.CPKG_KEY }}" --host="https://cpkg.tesseslanguage.com/"
|
||||
cd ../webapp
|
||||
crosslang upload-package --token="${{ secrets.CPKG_KEY }}" --host="https://cpkg.tesseslanguage.com/"
|
||||
cd ../npmweb
|
||||
crosslang upload-package --token="${{ secrets.CPKG_KEY }}" --host="https://cpkg.tesseslanguage.com/"
|
||||
cd ../npmwebapp
|
||||
crosslang upload-package --token="${{ secrets.CPKG_KEY }}" --host="https://cpkg.tesseslanguage.com/"
|
||||
wget -O /usr/local/bin/docker https://downloads.tesses.net/cache/other/docker/docker
|
||||
chmod 755 /usr/local/bin/docker
|
||||
- name: "Publish artifacts"
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
env:
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
## Changelog
|
||||
|
||||
## v0.0.3
|
||||
Work with slim instead
|
||||
|
||||
## v0.0.2
|
||||
Add the templates for npm
|
||||
|
||||
## v0.0.1
|
||||
Make CPKG more complete
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
FROM git.tesses.org/tesses50/crosslang:latest
|
||||
WORKDIR /app
|
||||
COPY ./Tesses.CrossLang.PackageServer/bin/Tesses.CrossLang.PackageServer-1.0.0.0-prod.crvm /app/Tesses.CrossLang.PackageServer-1.0.0.0-prod.crvm
|
||||
COPY ./Tesses.CrossLang.PackageServer/bin/Tesses.CrossLang.PackageServer-1.0.0.0-dev.crvm /app/Tesses.CrossLang.PackageServer-1.0.0.0-dev.crvm
|
||||
|
||||
EXPOSE 4206
|
||||
ENTRYPOINT ["crossvm","Tesses.CrossLang.PackageServer-1.0.0.0-prod.crvm","/data"]
|
||||
ENTRYPOINT ["crossvm","Tesses.CrossLang.PackageServer-1.0.0.0-dev.crvm","/data"]
|
||||
@@ -6,15 +6,15 @@
|
||||
|
||||
# To Build
|
||||
```bash
|
||||
crossint ./build.tcross
|
||||
crosslang int ./build.tcross
|
||||
```
|
||||
|
||||
# To Install
|
||||
```bash
|
||||
crossint ./build.tcross install
|
||||
crosslang int ./build.tcross install
|
||||
```
|
||||
|
||||
# To Pack
|
||||
```bash
|
||||
crossint ./build.tcross pack
|
||||
crosslang int ./build.tcross pack
|
||||
```
|
||||
@@ -0,0 +1,5 @@
|
||||
.DS_Store
|
||||
bin
|
||||
obj
|
||||
publish
|
||||
thumbs.db
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "Tesses.CrossLang.Template.CompileTool",
|
||||
"version": "1.0.0.0-prod",
|
||||
"version": "1.0.0.0-dev",
|
||||
"info": {
|
||||
"maintainer": "Mike Nolan",
|
||||
"type": "template",
|
||||
"repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||
"repo": "https://git.tesses.org/tesses50/crosslangextras",
|
||||
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||
"license": "MIT",
|
||||
"short_name": "compiletool",
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
.DS_Store
|
||||
bin
|
||||
obj
|
||||
publish
|
||||
thumbs.db
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "Tesses.CrossLang.Template.Console",
|
||||
"version": "1.0.0.0-prod",
|
||||
"version": "1.0.0.0-dev",
|
||||
"info": {
|
||||
"maintainer": "Mike Nolan",
|
||||
"type": "template",
|
||||
"repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||
"repo": "https://git.tesses.org/tesses50/crosslangextras",
|
||||
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||
"license": "MIT",
|
||||
"short_name": "console",
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
.DS_Store
|
||||
bin
|
||||
obj
|
||||
publish
|
||||
thumbs.db
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "Tesses.CrossLang.Template.EmptyWebsite",
|
||||
"version": "1.0.0.0-prod",
|
||||
"version": "1.0.0.0-dev",
|
||||
"info": {
|
||||
"maintainer": "Mike Nolan",
|
||||
"type": "template",
|
||||
"repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||
"repo": "https://git.tesses.org/tesses50/crosslangextras",
|
||||
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||
"license": "MIT",
|
||||
"short_name": "emptyweb",
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
.DS_Store
|
||||
bin
|
||||
obj
|
||||
publish
|
||||
thumbs.db
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "Tesses.CrossLang.Template.Library",
|
||||
"version": "1.0.0.0-prod",
|
||||
"version": "1.0.0.0-dev",
|
||||
"info": {
|
||||
"maintainer": "Mike Nolan",
|
||||
"type": "template",
|
||||
"repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||
"repo": "https://git.tesses.org/tesses50/crosslangextras",
|
||||
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||
"license": "MIT",
|
||||
"short_name": "lib",
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
.DS_Store
|
||||
bin
|
||||
obj
|
||||
publish
|
||||
npm/node_modules
|
||||
npm/package-lock.json
|
||||
npm/dist
|
||||
thumbs.db
|
||||
@@ -0,0 +1,8 @@
|
||||
.DS_Store
|
||||
bin
|
||||
obj
|
||||
publish
|
||||
npm/node_modules
|
||||
npm/package-lock.json
|
||||
npm/dist
|
||||
thumbs.db
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"$schema": "https:\/\/crosslang.tesseslanguage.com\/\/schema\/cross-json-schema.json",
|
||||
"info": {
|
||||
"template_ignored_files": [
|
||||
".DS_Store",
|
||||
"bin",
|
||||
"obj",
|
||||
"publish",
|
||||
"npm/node_modules",
|
||||
"npm/package-lock.json",
|
||||
"npm/dist",
|
||||
"thumbs.db"
|
||||
],
|
||||
"short_name_pretty": "NPM WebSite",
|
||||
"maintainer": "Mike Nolan",
|
||||
"type": "template",
|
||||
"repo": "https://git.tesses.org/tesses50/crosslangextras",
|
||||
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||
"license": "MIT",
|
||||
"short_name": "npmweb",
|
||||
"description": "A NPM Website Template with BeerCSS and HTMX",
|
||||
"template_info": {
|
||||
"type": "console"
|
||||
},
|
||||
"template_prebuild": [
|
||||
{
|
||||
"workdir": "npm",
|
||||
"commands": [
|
||||
["npm","install"],
|
||||
["npm","run","publish"]
|
||||
],
|
||||
"res": [
|
||||
"npm/dist"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "Tesses.CrossLang.Template.NPMWebsite",
|
||||
"version": "1.0.0.0-dev"
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"beercss": "^4.0.21",
|
||||
"htmx.org": "^2.0.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.28.0"
|
||||
},
|
||||
"scripts": {
|
||||
"publish": "esbuild --minify --sourcemap --define:'process.env.NODE_ENV=\"production\"' --bundle --outdir=dist web.mjs --loader:.svg=file --loader:.woff2=file"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
:root,
|
||||
body.light {
|
||||
--primary:#855400;
|
||||
--on-primary:#ffffff;
|
||||
--primary-container:#ffddb7;
|
||||
--on-primary-container:#2a1700;
|
||||
--secondary:#705b41;
|
||||
--on-secondary:#ffffff;
|
||||
--secondary-container:#fcdebc;
|
||||
--on-secondary-container:#281805;
|
||||
--tertiary:#53643e;
|
||||
--on-tertiary:#ffffff;
|
||||
--tertiary-container:#d6e9b9;
|
||||
--on-tertiary-container:#121f03;
|
||||
--error:#ba1a1a;
|
||||
--on-error:#ffffff;
|
||||
--error-container:#ffdad6;
|
||||
--on-error-container:#410002;
|
||||
--background:#fffbff;
|
||||
--on-background:#1f1b16;
|
||||
--surface:#fff8f4;
|
||||
--on-surface:#1f1b16;
|
||||
--surface-variant:#f0e0d0;
|
||||
--on-surface-variant:#504539;
|
||||
--outline:#827568;
|
||||
--outline-variant:#d4c4b5;
|
||||
--shadow:#000000;
|
||||
--scrim:#000000;
|
||||
--inverse-surface:#352f2a;
|
||||
--inverse-on-surface:#f9efe7;
|
||||
--inverse-primary:#ffb95c;
|
||||
--surface-dim:#e2d8d1;
|
||||
--surface-bright:#fff8f4;
|
||||
--surface-container-lowest:#ffffff;
|
||||
--surface-container-low:#fcf2ea;
|
||||
--surface-container:#f6ece4;
|
||||
--surface-container-high:#f0e6de;
|
||||
--surface-container-highest:#ebe1d9;
|
||||
}
|
||||
|
||||
body.dark {
|
||||
--primary:#ffb95c;
|
||||
--on-primary:#462a00;
|
||||
--primary-container:#653e00;
|
||||
--on-primary-container:#ffddb7;
|
||||
--secondary:#dfc2a2;
|
||||
--on-secondary:#3f2d17;
|
||||
--secondary-container:#57432b;
|
||||
--on-secondary-container:#fcdebc;
|
||||
--tertiary:#bacd9f;
|
||||
--on-tertiary:#263514;
|
||||
--tertiary-container:#3c4c28;
|
||||
--on-tertiary-container:#d6e9b9;
|
||||
--error:#ffb4ab;
|
||||
--on-error:#690005;
|
||||
--error-container:#93000a;
|
||||
--on-error-container:#ffb4ab;
|
||||
--background:#1f1b16;
|
||||
--on-background:#ebe1d9;
|
||||
--surface:#17130e;
|
||||
--on-surface:#ebe1d9;
|
||||
--surface-variant:#504539;
|
||||
--on-surface-variant:#d4c4b5;
|
||||
--outline:#9c8e80;
|
||||
--outline-variant:#504539;
|
||||
--shadow:#000000;
|
||||
--scrim:#000000;
|
||||
--inverse-surface:#ebe1d9;
|
||||
--inverse-on-surface:#352f2a;
|
||||
--inverse-primary:#855400;
|
||||
--surface-dim:#17130e;
|
||||
--surface-bright:#3e3833;
|
||||
--surface-container-lowest:#110e09;
|
||||
--surface-container-low:#1f1b16;
|
||||
--surface-container:#231f1a;
|
||||
--surface-container-high:#2e2924;
|
||||
--surface-container-highest:#39342f;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import 'beercss'
|
||||
import 'htmx.org'
|
||||
import './web.css'
|
||||
@@ -0,0 +1,78 @@
|
||||
func Components.Shell(title,pages,body)
|
||||
{
|
||||
<return>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/dist/web.css">
|
||||
<title>%PROJECT_NAME% - {title}</title>
|
||||
<script src="/dist/web.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<dialog class="left" id="leftpane">
|
||||
<header>
|
||||
<nav>
|
||||
<img class="circle large" src="/tytd-128.png">
|
||||
<h6 class="max">%PROJECT_NAME%</h6>
|
||||
<button hx-on:click="ui('#leftpane')" class="transparent circle large">
|
||||
<i>close</i>
|
||||
</button>
|
||||
</nav>
|
||||
</header>
|
||||
<div class="space"></div>
|
||||
<ul class="list">
|
||||
<each(var item : pages)>
|
||||
<if(item.active)>
|
||||
<true>
|
||||
<li class="wave round primary" hx-target="body" hx-push-url="true" hx-get={item.link}>
|
||||
<i>{item.icon}</i>
|
||||
<span class="max">{item.text}</span>
|
||||
<b></b>
|
||||
|
||||
</li>
|
||||
</true>
|
||||
<false>
|
||||
<li class="wave round" hx-target="body" hx-push-url="true" hx-get={item.route}>
|
||||
<i>{item.icon}</i>
|
||||
<span class="max">{item.text}</span>
|
||||
<b></b>
|
||||
|
||||
</li>
|
||||
</false>
|
||||
</if>
|
||||
</each>
|
||||
|
||||
|
||||
</ul>
|
||||
</dialog>
|
||||
<header class="fixed primary-container">
|
||||
<nav>
|
||||
<button hx-on:click="ui('#leftpane')" class="circle transparent">
|
||||
<i>menu</i>
|
||||
</button>
|
||||
<button hx-target="body" hx-push-url="true" hx-get="/" class="circle transparent">
|
||||
<i>home</i>
|
||||
</button>
|
||||
<div class="max"></div>
|
||||
<div>
|
||||
<button class="circle transparent">
|
||||
<i>more_vert</i>
|
||||
</button>
|
||||
<menu class="left no-wrap">
|
||||
<li><a href="https://beercss.com/">BeerCSS</a></li>
|
||||
</menu>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="small-padding">
|
||||
<h5>%PROJECT_NAME%</h5>
|
||||
</div>
|
||||
</header>
|
||||
<main class="responsive">
|
||||
<raw(body)>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
</return>
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
|
||||
|
||||
func Pages.About(ctx)
|
||||
{
|
||||
var pages = [
|
||||
{
|
||||
active = false,
|
||||
route = "/",
|
||||
text = "Home",
|
||||
icon = "home"
|
||||
},
|
||||
{
|
||||
active = false,
|
||||
route = "/counter",
|
||||
text = "Counter",
|
||||
icon = "exposure_plus_1"
|
||||
},
|
||||
{
|
||||
active = true,
|
||||
route = "/about",
|
||||
text = "About",
|
||||
icon = "info"
|
||||
}
|
||||
];
|
||||
ctx.WithMimeType("text/html").SendText(Components.Shell("About Me",pages,<section>
|
||||
<h1>About Me</h1>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
</p>
|
||||
</section>
|
||||
));
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
var counter = 0;
|
||||
|
||||
func Pages.Counter(ctx)
|
||||
{
|
||||
var pages = [
|
||||
{
|
||||
active = false,
|
||||
route = "/",
|
||||
text = "Home",
|
||||
icon = "home"
|
||||
},
|
||||
{
|
||||
active = true,
|
||||
route = "/counter",
|
||||
text = "Counter",
|
||||
icon = "exposure_plus_1"
|
||||
},
|
||||
{
|
||||
active = false,
|
||||
route = "/about",
|
||||
text = "About",
|
||||
icon = "info"
|
||||
}
|
||||
];
|
||||
ctx.WithMimeType("text/html").SendText(Components.Shell("Counter",pages,<section>
|
||||
<button hx-get="./counter" hx-target="body" hx-push-url="true">Counter is {++counter}</button>
|
||||
</section>
|
||||
));
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
func Pages.Echo(ctx)
|
||||
{
|
||||
const text = ctx.QueryParams.TryGetFirst("text");
|
||||
var pages = [
|
||||
{
|
||||
active = true,
|
||||
route = "/",
|
||||
text = "Home",
|
||||
icon = "home"
|
||||
},
|
||||
{
|
||||
active = false,
|
||||
route = "/counter",
|
||||
text = "Counter",
|
||||
icon = "exposure_plus_1"
|
||||
},
|
||||
{
|
||||
active = false,
|
||||
route = "/about",
|
||||
text = "About",
|
||||
icon = "info"
|
||||
}
|
||||
];
|
||||
ctx.WithMimeType("text/html").SendText(Components.Shell("Echo",pages,<section>
|
||||
<if(text != null)>
|
||||
<true>
|
||||
<plink(text)>
|
||||
</true>
|
||||
<false>
|
||||
<p>No text available</p>
|
||||
</false>
|
||||
</if>
|
||||
</section>));
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
func Pages.Index(ctx)
|
||||
{
|
||||
var pages = [
|
||||
{
|
||||
active = true,
|
||||
route = "/",
|
||||
text = "Home",
|
||||
icon = "home"
|
||||
},
|
||||
{
|
||||
active = false,
|
||||
route = "/counter",
|
||||
text = "Counter",
|
||||
icon = "exposure_plus_1"
|
||||
},
|
||||
{
|
||||
active = false,
|
||||
route = "/about",
|
||||
text = "About",
|
||||
icon = "info"
|
||||
}
|
||||
];
|
||||
ctx.WithMimeType("text/html").SendText(Components.Shell("Main Page",pages,<section>
|
||||
<form hx-get="./echo" hx-target="body" hx-push-url="true" action="./echo" method="GET">
|
||||
<div class="row">
|
||||
<div class="max">
|
||||
<div class="field label border">
|
||||
<input type="text" name="text">
|
||||
<label>Text to echo</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="min">
|
||||
<button type="submit">
|
||||
Echo
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<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>
|
||||
</section>));
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
class MyWebApp {
|
||||
private fileServer;
|
||||
private mountable;
|
||||
private pages;
|
||||
|
||||
public MyWebApp()
|
||||
{
|
||||
this.fileServer = new FileServer(embeddir("/"), true, false);
|
||||
|
||||
this.mountable = new MountableServer((ctx)=>{
|
||||
const page = this.pages.[ctx.Path];
|
||||
if(TypeIsDefined(page)) return page(ctx);
|
||||
return false;
|
||||
});
|
||||
this.mountable.Mount("/dist/",this.fileServer);
|
||||
this.pages = {
|
||||
.["/"] = Pages.Index,
|
||||
.["/counter"] = Pages.Counter,
|
||||
.["/about"] = Pages.About,
|
||||
.["/echo"] = Pages.Echo
|
||||
};
|
||||
}
|
||||
|
||||
public Handle(ctx)
|
||||
{
|
||||
return this.mountable.Handle(ctx);
|
||||
}
|
||||
public Close()
|
||||
{
|
||||
this.mountable = null;
|
||||
}
|
||||
}
|
||||
|
||||
func main(args)
|
||||
{
|
||||
const webApp=new MyWebApp();
|
||||
Net.Http.ListenSimpleWithLoop(webApp,4206);
|
||||
|
||||
webApp.Close();
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
.DS_Store
|
||||
bin
|
||||
obj
|
||||
publish
|
||||
npm/node_modules
|
||||
npm/package-lock.json
|
||||
npm/dist
|
||||
thumbs.db
|
||||
@@ -0,0 +1,8 @@
|
||||
.DS_Store
|
||||
bin
|
||||
obj
|
||||
publish
|
||||
npm/node_modules
|
||||
npm/package-lock.json
|
||||
npm/dist
|
||||
thumbs.db
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"$schema": "https:\/\/crosslang.tesseslanguage.com\/\/schema\/cross-json-schema.json",
|
||||
"info": {
|
||||
"template_ignored_files": [
|
||||
".DS_Store",
|
||||
"bin",
|
||||
"obj",
|
||||
"publish",
|
||||
"npm/node_modules",
|
||||
"npm/package-lock.json",
|
||||
"npm/dist",
|
||||
"thumbs.db"
|
||||
],
|
||||
"short_name_pretty": "NPM WebApp",
|
||||
"maintainer": "Mike Nolan",
|
||||
"type": "template",
|
||||
"repo": "https://git.tesses.org/tesses50/crosslangextras",
|
||||
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||
"license": "MIT",
|
||||
"short_name": "npmwebapp",
|
||||
"description": "A NPM WebApp Template with BeerCSS and HTMX",
|
||||
"template_info": {
|
||||
"type": "webapp",
|
||||
"short_name": "changeme",
|
||||
"short_name_pretty": "Change Me"
|
||||
},
|
||||
"template_prebuild": [
|
||||
{
|
||||
"workdir": "npm",
|
||||
"commands": [
|
||||
["npm","install"],
|
||||
["npm","run","publish"]
|
||||
],
|
||||
"res": [
|
||||
"npm/dist"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"name": "Tesses.CrossLang.Template.NPMWebApp",
|
||||
"version": "1.0.0.0-dev"
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"beercss": "^4.0.21",
|
||||
"htmx.org": "^2.0.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.28.0"
|
||||
},
|
||||
"scripts": {
|
||||
"publish": "esbuild --minify --sourcemap --define:'process.env.NODE_ENV=\"production\"' --bundle --outdir=dist web.mjs --loader:.svg=file --loader:.woff2=file"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
:root,
|
||||
body.light {
|
||||
--primary:#855400;
|
||||
--on-primary:#ffffff;
|
||||
--primary-container:#ffddb7;
|
||||
--on-primary-container:#2a1700;
|
||||
--secondary:#705b41;
|
||||
--on-secondary:#ffffff;
|
||||
--secondary-container:#fcdebc;
|
||||
--on-secondary-container:#281805;
|
||||
--tertiary:#53643e;
|
||||
--on-tertiary:#ffffff;
|
||||
--tertiary-container:#d6e9b9;
|
||||
--on-tertiary-container:#121f03;
|
||||
--error:#ba1a1a;
|
||||
--on-error:#ffffff;
|
||||
--error-container:#ffdad6;
|
||||
--on-error-container:#410002;
|
||||
--background:#fffbff;
|
||||
--on-background:#1f1b16;
|
||||
--surface:#fff8f4;
|
||||
--on-surface:#1f1b16;
|
||||
--surface-variant:#f0e0d0;
|
||||
--on-surface-variant:#504539;
|
||||
--outline:#827568;
|
||||
--outline-variant:#d4c4b5;
|
||||
--shadow:#000000;
|
||||
--scrim:#000000;
|
||||
--inverse-surface:#352f2a;
|
||||
--inverse-on-surface:#f9efe7;
|
||||
--inverse-primary:#ffb95c;
|
||||
--surface-dim:#e2d8d1;
|
||||
--surface-bright:#fff8f4;
|
||||
--surface-container-lowest:#ffffff;
|
||||
--surface-container-low:#fcf2ea;
|
||||
--surface-container:#f6ece4;
|
||||
--surface-container-high:#f0e6de;
|
||||
--surface-container-highest:#ebe1d9;
|
||||
}
|
||||
|
||||
body.dark {
|
||||
--primary:#ffb95c;
|
||||
--on-primary:#462a00;
|
||||
--primary-container:#653e00;
|
||||
--on-primary-container:#ffddb7;
|
||||
--secondary:#dfc2a2;
|
||||
--on-secondary:#3f2d17;
|
||||
--secondary-container:#57432b;
|
||||
--on-secondary-container:#fcdebc;
|
||||
--tertiary:#bacd9f;
|
||||
--on-tertiary:#263514;
|
||||
--tertiary-container:#3c4c28;
|
||||
--on-tertiary-container:#d6e9b9;
|
||||
--error:#ffb4ab;
|
||||
--on-error:#690005;
|
||||
--error-container:#93000a;
|
||||
--on-error-container:#ffb4ab;
|
||||
--background:#1f1b16;
|
||||
--on-background:#ebe1d9;
|
||||
--surface:#17130e;
|
||||
--on-surface:#ebe1d9;
|
||||
--surface-variant:#504539;
|
||||
--on-surface-variant:#d4c4b5;
|
||||
--outline:#9c8e80;
|
||||
--outline-variant:#504539;
|
||||
--shadow:#000000;
|
||||
--scrim:#000000;
|
||||
--inverse-surface:#ebe1d9;
|
||||
--inverse-on-surface:#352f2a;
|
||||
--inverse-primary:#855400;
|
||||
--surface-dim:#17130e;
|
||||
--surface-bright:#3e3833;
|
||||
--surface-container-lowest:#110e09;
|
||||
--surface-container-low:#1f1b16;
|
||||
--surface-container:#231f1a;
|
||||
--surface-container-high:#2e2924;
|
||||
--surface-container-highest:#39342f;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import 'beercss'
|
||||
import 'htmx.org'
|
||||
import './web.css'
|
||||
@@ -0,0 +1,78 @@
|
||||
func Components.Shell(title,pages,body)
|
||||
{
|
||||
<return>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/dist/web.css">
|
||||
<title>%PROJECT_NAME% - {title}</title>
|
||||
<script src="/dist/web.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<dialog class="left" id="leftpane">
|
||||
<header>
|
||||
<nav>
|
||||
<img class="circle large" src="/tytd-128.png">
|
||||
<h6 class="max">%PROJECT_NAME%</h6>
|
||||
<button hx-on:click="ui('#leftpane')" class="transparent circle large">
|
||||
<i>close</i>
|
||||
</button>
|
||||
</nav>
|
||||
</header>
|
||||
<div class="space"></div>
|
||||
<ul class="list">
|
||||
<each(var item : pages)>
|
||||
<if(item.active)>
|
||||
<true>
|
||||
<li class="wave round primary" hx-target="body" hx-push-url="true" hx-get={item.link}>
|
||||
<i>{item.icon}</i>
|
||||
<span class="max">{item.text}</span>
|
||||
<b></b>
|
||||
|
||||
</li>
|
||||
</true>
|
||||
<false>
|
||||
<li class="wave round" hx-target="body" hx-push-url="true" hx-get={item.route}>
|
||||
<i>{item.icon}</i>
|
||||
<span class="max">{item.text}</span>
|
||||
<b></b>
|
||||
|
||||
</li>
|
||||
</false>
|
||||
</if>
|
||||
</each>
|
||||
|
||||
|
||||
</ul>
|
||||
</dialog>
|
||||
<header class="fixed primary-container">
|
||||
<nav>
|
||||
<button hx-on:click="ui('#leftpane')" class="circle transparent">
|
||||
<i>menu</i>
|
||||
</button>
|
||||
<button hx-target="body" hx-push-url="true" hx-get="/" class="circle transparent">
|
||||
<i>home</i>
|
||||
</button>
|
||||
<div class="max"></div>
|
||||
<div>
|
||||
<button class="circle transparent">
|
||||
<i>more_vert</i>
|
||||
</button>
|
||||
<menu class="left no-wrap">
|
||||
<li><a href="https://beercss.com/">BeerCSS</a></li>
|
||||
</menu>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="small-padding">
|
||||
<h5>%PROJECT_NAME%</h5>
|
||||
</div>
|
||||
</header>
|
||||
<main class="responsive">
|
||||
<raw(body)>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
</return>
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
|
||||
|
||||
func Pages.About(ctx)
|
||||
{
|
||||
var pages = [
|
||||
{
|
||||
active = false,
|
||||
route = "/",
|
||||
text = "Home",
|
||||
icon = "home"
|
||||
},
|
||||
{
|
||||
active = false,
|
||||
route = "/counter",
|
||||
text = "Counter",
|
||||
icon = "exposure_plus_1"
|
||||
},
|
||||
{
|
||||
active = true,
|
||||
route = "/about",
|
||||
text = "About",
|
||||
icon = "info"
|
||||
}
|
||||
];
|
||||
ctx.WithMimeType("text/html").SendText(Components.Shell("About Me",pages,<section>
|
||||
<h1>About Me</h1>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
</p>
|
||||
</section>
|
||||
));
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
var counter = 0;
|
||||
|
||||
func Pages.Counter(ctx)
|
||||
{
|
||||
var pages = [
|
||||
{
|
||||
active = false,
|
||||
route = "/",
|
||||
text = "Home",
|
||||
icon = "home"
|
||||
},
|
||||
{
|
||||
active = true,
|
||||
route = "/counter",
|
||||
text = "Counter",
|
||||
icon = "exposure_plus_1"
|
||||
},
|
||||
{
|
||||
active = false,
|
||||
route = "/about",
|
||||
text = "About",
|
||||
icon = "info"
|
||||
}
|
||||
];
|
||||
ctx.WithMimeType("text/html").SendText(Components.Shell("Counter",pages,<section>
|
||||
<button hx-get="./counter" hx-target="body" hx-push-url="true">Counter is {++counter}</button>
|
||||
</section>
|
||||
));
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
func Pages.Echo(ctx)
|
||||
{
|
||||
const text = ctx.QueryParams.TryGetFirst("text");
|
||||
var pages = [
|
||||
{
|
||||
active = true,
|
||||
route = "/",
|
||||
text = "Home",
|
||||
icon = "home"
|
||||
},
|
||||
{
|
||||
active = false,
|
||||
route = "/counter",
|
||||
text = "Counter",
|
||||
icon = "exposure_plus_1"
|
||||
},
|
||||
{
|
||||
active = false,
|
||||
route = "/about",
|
||||
text = "About",
|
||||
icon = "info"
|
||||
}
|
||||
];
|
||||
ctx.WithMimeType("text/html").SendText(Components.Shell("Echo",pages,<section>
|
||||
<if(text != null)>
|
||||
<true>
|
||||
<plink(text)>
|
||||
</true>
|
||||
<false>
|
||||
<p>No text available</p>
|
||||
</false>
|
||||
</if>
|
||||
</section>));
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
func Pages.Index(ctx)
|
||||
{
|
||||
var pages = [
|
||||
{
|
||||
active = true,
|
||||
route = "/",
|
||||
text = "Home",
|
||||
icon = "home"
|
||||
},
|
||||
{
|
||||
active = false,
|
||||
route = "/counter",
|
||||
text = "Counter",
|
||||
icon = "exposure_plus_1"
|
||||
},
|
||||
{
|
||||
active = false,
|
||||
route = "/about",
|
||||
text = "About",
|
||||
icon = "info"
|
||||
}
|
||||
];
|
||||
ctx.WithMimeType("text/html").SendText(Components.Shell("Main Page",pages,<section>
|
||||
<form hx-get="./echo" hx-target="body" hx-push-url="true" action="./echo" method="GET">
|
||||
<div class="row">
|
||||
<div class="max">
|
||||
<div class="field label border">
|
||||
<input type="text" name="text">
|
||||
<label>Text to echo</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="min">
|
||||
<button type="submit">
|
||||
Echo
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<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>
|
||||
</section>));
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
class MyWebApp {
|
||||
private fileServer;
|
||||
private mountable;
|
||||
private pages;
|
||||
|
||||
public MyWebApp()
|
||||
{
|
||||
this.fileServer = new FileServer(embeddir("/"), true, false);
|
||||
|
||||
this.mountable = new MountableServer((ctx)=>{
|
||||
const page = this.pages.[ctx.Path];
|
||||
if(TypeIsDefined(page)) return page(ctx);
|
||||
return false;
|
||||
});
|
||||
this.mountable.Mount("/dist/",this.fileServer);
|
||||
this.pages = {
|
||||
.["/"] = Pages.Index,
|
||||
.["/counter"] = Pages.Counter,
|
||||
.["/about"] = Pages.About,
|
||||
.["/echo"] = Pages.Echo
|
||||
};
|
||||
}
|
||||
|
||||
public Handle(ctx)
|
||||
{
|
||||
return this.mountable.Handle(ctx);
|
||||
}
|
||||
public Close()
|
||||
{
|
||||
this.mountable = null;
|
||||
}
|
||||
}
|
||||
|
||||
func WebAppMain(args)
|
||||
{
|
||||
return new MyWebApp();
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
.DS_Store
|
||||
bin
|
||||
obj
|
||||
publish
|
||||
thumbs.db
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "Tesses.CrossLang.Template.Template",
|
||||
"version": "1.0.0.0-prod",
|
||||
"version": "1.0.0.0-dev",
|
||||
"info": {
|
||||
"maintainer": "Mike Nolan",
|
||||
"type": "template",
|
||||
"repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||
"repo": "https://git.tesses.org/tesses50/crosslangextras",
|
||||
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||
"license": "MIT",
|
||||
"short_name": "template",
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
.DS_Store
|
||||
bin
|
||||
obj
|
||||
publish
|
||||
thumbs.db
|
||||
@@ -17,12 +17,12 @@
|
||||
"description": "A crosslang tool that you can run via crosslang tool",
|
||||
"type": "template",
|
||||
"maintainer": "Mike Nolan",
|
||||
"repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||
"repo": "https://git.tesses.org/tesses50/crosslangextras",
|
||||
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||
"license": "MIT",
|
||||
"short_name_pretty": "Tool"
|
||||
},
|
||||
"version": "1.0.0.0-prod",
|
||||
"version": "1.0.0.0-dev",
|
||||
"name": "Tesses.CrossLang.Template.Tool",
|
||||
"$schema": "https://crosslang.tesseslanguage.com//schema/cross-json-schema.json"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
.DS_Store
|
||||
bin
|
||||
obj
|
||||
publish
|
||||
thumbs.db
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "Tesses.CrossLang.Template.Website",
|
||||
"version": "1.0.0.0-prod",
|
||||
"version": "1.0.0.0-dev",
|
||||
"info": {
|
||||
"maintainer": "Mike Nolan",
|
||||
"type": "template",
|
||||
"repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||
"repo": "https://git.tesses.org/tesses50/crosslangextras",
|
||||
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||
"license": "MIT",
|
||||
"short_name": "web",
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
.DS_Store
|
||||
bin
|
||||
obj
|
||||
publish
|
||||
thumbs.db
|
||||
@@ -15,12 +15,12 @@
|
||||
"short_name_pretty": "Web Application",
|
||||
"template_project_dependencies": [
|
||||
],
|
||||
"repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||
"repo": "https://git.tesses.org/tesses50/crosslangextras",
|
||||
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||
"type": "template",
|
||||
"description": "A web app (for webview or eventual cloud OS)"
|
||||
},
|
||||
"name": "Tesses.CrossLang.Template.WebApp",
|
||||
"version": "1.0.0.0-prod",
|
||||
"version": "1.0.0.0-dev",
|
||||
"$schema": "https://crosslang.tesseslanguage.com//schema/cross-json-schema.json"
|
||||
}
|
||||
@@ -11,5 +11,5 @@
|
||||
"project_dependencies": [
|
||||
"..\/Tesses.CrossLang.BuildEssentials"
|
||||
],
|
||||
"version": "1.0.0.0-prod"
|
||||
"version": "1.0.0.0-dev"
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "Tesses.CrossLang.Args",
|
||||
"version": "1.0.0.0-prod",
|
||||
"version": "1.0.0.0-dev",
|
||||
"info": {
|
||||
"maintainer": "Mike Nolan",
|
||||
"type": "lib",
|
||||
"repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||
"repo": "https://git.tesses.org/tesses50/crosslangextras",
|
||||
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||
"license": "LGPLv3"
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "Tesses.CrossLang.BuildEssentials",
|
||||
"version": "1.0.0.0-prod",
|
||||
"version": "1.0.0.0-dev",
|
||||
"info": {
|
||||
"maintainer": "Mike Nolan",
|
||||
"type": "lib",
|
||||
"repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||
"repo": "https://git.tesses.org/tesses50/crosslangextras",
|
||||
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||
"license": "LGPLv3"
|
||||
}
|
||||
|
||||
@@ -3,9 +3,13 @@
|
||||
"info": {
|
||||
"type": "console",
|
||||
"short_name": "packageserver",
|
||||
"short_name_pretty": "Package Server"
|
||||
"short_name_pretty": "Package Server",
|
||||
"description": "This webapp allows you to serve packages",
|
||||
"repo": "https://git.tesses.org/tesses50/crosslangextras",
|
||||
"homepage": "https://cpkg.tesseslanguage.com/",
|
||||
"license": "AGPLv3"
|
||||
},
|
||||
"version": "1.0.0.0-prod",
|
||||
"version": "1.0.0.0-dev",
|
||||
"name": "Tesses.CrossLang.PackageServer",
|
||||
"compTime": "secure"
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ func main(args)
|
||||
PUT /api/v1/upload Authorization Bearer
|
||||
POST /api/v1/login Json object with email and password returns json object with either 200 for success {"token": "TOKEN_VAL"} or non 2XX if fails {"reason": "SOME ERROR"}
|
||||
POST /api/v1/logout use Authorization Bearer
|
||||
GET /api/v1/latest?name=PackageName returns 200 OK with json {"version": "1.0.0.0-prod"} if it succeeds if it fails returns a failing status code with {"reason": "SOME ERROR"}
|
||||
GET /api/v1/latest?name=PackageName returns 200 OK with json {"version":"1.0.0.0-dev"} if it succeeds if it fails returns a failing status code with {"reason": "SOME ERROR"}
|
||||
GET /api/v1/download?name=PackageName&version=1.0.0.0-prod returns 200 OK with package bytes or 404 if doesn't exist
|
||||
GET /api/v1/search?q=SomeQuery&offset=&limit= returns 200 OK with json of packages {"packages": [{"name": "pkgName","version": "latestVersion", ...}]} or non success status code
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ func VM.RunEventLoop()
|
||||
/^
|
||||
Merge all crvm files into one and returns path inside destVFS of output
|
||||
You should have srcFS a SubdirFilesystem to directory with executable
|
||||
so if the source executable was /app/bin/app-1.0.0.0-prod.crvm you should pass a SubdirFilesystem pointing to the directory /app/bin and sourcePath set to /app-1.0.0.0-prod.crvm and destVFS to a empty SubdirFilesystem
|
||||
so if the source executable was /app/bin/app-1.0.0.0-dev.crvm you should pass a SubdirFilesystem pointing to the directory /app/bin and sourcePath set to /app-1.0.0.0-dev.crvm and destVFS to a empty SubdirFilesystem
|
||||
^/
|
||||
func VM.Merge(srcVFS,sourcePath,destVFS)
|
||||
{
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "Tesses.CrossLang.Shell",
|
||||
"version": "1.0.0.0-prod",
|
||||
"version": "1.0.0.0-dev",
|
||||
"dependencies": [],
|
||||
"info": {
|
||||
"maintainer": "Mike Nolan",
|
||||
"type": "console",
|
||||
"repo": "https://onedev.site.tesses.net/CrossLang/CrossLangExtras",
|
||||
"repo": "https://git.tesses.org/tesses50/crosslangextras",
|
||||
"homepage": "https://crosslang.tesseslanguage.com/",
|
||||
"license": "LGPLv3"
|
||||
},
|
||||
|
||||
@@ -74,6 +74,7 @@ func Tesses.CrossLang.Shell.New(dd)
|
||||
var old_info = proj.info;
|
||||
proj.info = old_info.template_info;
|
||||
proj.icon = old_info.template_icon;
|
||||
proj.prebuild = old_info.template_prebuild;
|
||||
proj.dependencies = old_info.template_project_dependencies;
|
||||
var srcDir = proj.source_directory;
|
||||
if(TypeOf(srcDir) == "Undefined") srcDir = "/src";
|
||||
@@ -105,7 +106,7 @@ func Tesses.CrossLang.Shell.New(dd)
|
||||
var src = FS.ReadAllText(projectDir, ent);
|
||||
|
||||
src = src.Replace("%PROJECT_NAME%",projectPath.GetFileName());
|
||||
src = src.Replace("%TEMPLATE_PROJECT_NAME%","%PROJECT_NAME");
|
||||
src = src.Replace("%TEMPLATE_PROJECT_NAME%","%PROJECT_NAME%");
|
||||
|
||||
FS.WriteAllText(projectDir, ent, src);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ class ExpectObj {
|
||||
this.SetRes(this.left == right, $"{this.left} is not equal to {right}");
|
||||
}
|
||||
}
|
||||
|
||||
public LessThan(right)
|
||||
{
|
||||
if(this.inverted)
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
"description": "The standard library of crosslang"
|
||||
},
|
||||
"name": "Tesses.CrossLang.Std",
|
||||
"version": "1.0.0.0-prod"
|
||||
"version": "1.0.0.0-dev"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
class ConcurrentQueue
|
||||
{
|
||||
private mtx = new Mutex();
|
||||
|
||||
private queue = new Queue();
|
||||
|
||||
public Enqueue(val)
|
||||
{
|
||||
mtx.Lock();
|
||||
queue.Enqueue(val);
|
||||
mtx.Unlock();
|
||||
|
||||
}
|
||||
|
||||
public Dequeue()
|
||||
{
|
||||
mtx.Lock();
|
||||
const val = queue.Dequeue();
|
||||
mtx.Unlock();
|
||||
|
||||
return val;
|
||||
}
|
||||
public Peek()
|
||||
{
|
||||
mtx.Lock();
|
||||
const val = queue.Peek();
|
||||
mtx.Unlock();
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
public getCount()
|
||||
{
|
||||
mtx.Lock();
|
||||
const val = queue.Count;
|
||||
mtx.Unlock();
|
||||
|
||||
return val;
|
||||
}
|
||||
public getLength()
|
||||
{
|
||||
mtx.Lock();
|
||||
const val = queue.Length;
|
||||
mtx.Unlock();
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
public ToList()
|
||||
{
|
||||
|
||||
mtx.Lock();
|
||||
|
||||
const ittr = new Queryable(queue);
|
||||
const ls = ittr.ToList();
|
||||
|
||||
mtx.Unlock();
|
||||
return ls;
|
||||
}
|
||||
|
||||
public GetEnumerator()
|
||||
{
|
||||
return ToList().GetEnumerator();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
class ConcurrentStack
|
||||
{
|
||||
private mtx = new Mutex();
|
||||
|
||||
private stack = new Stack();
|
||||
|
||||
public Push(val)
|
||||
{
|
||||
mtx.Lock();
|
||||
stack.Push(val);
|
||||
mtx.Unlock();
|
||||
|
||||
}
|
||||
|
||||
public Pop()
|
||||
{
|
||||
mtx.Lock();
|
||||
const val = stack.Pop();
|
||||
mtx.Unlock();
|
||||
|
||||
return val;
|
||||
}
|
||||
public Top()
|
||||
{
|
||||
mtx.Lock();
|
||||
const val = stack.Top();
|
||||
mtx.Unlock();
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
public getCount()
|
||||
{
|
||||
mtx.Lock();
|
||||
const val = stack.Count;
|
||||
mtx.Unlock();
|
||||
|
||||
return val;
|
||||
}
|
||||
public getLength()
|
||||
{
|
||||
mtx.Lock();
|
||||
const val = stack.Length;
|
||||
mtx.Unlock();
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
public ToList()
|
||||
{
|
||||
|
||||
mtx.Lock();
|
||||
|
||||
const ittr = new Queryable(stack);
|
||||
const ls = ittr.ToList();
|
||||
|
||||
mtx.Unlock();
|
||||
return ls;
|
||||
}
|
||||
|
||||
public GetEnumerator()
|
||||
{
|
||||
return ToList().GetEnumerator();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
class Queue
|
||||
{
|
||||
private items = [];
|
||||
|
||||
public Enqueue(val)
|
||||
{
|
||||
items.Add(val);
|
||||
}
|
||||
|
||||
public Dequeue()
|
||||
{
|
||||
if(items.Count == 0) return null;
|
||||
const val = items[0];
|
||||
items.RemoveAt(0);
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
public Peek()
|
||||
{
|
||||
if(items.Count == 0) return null;
|
||||
return items[0];
|
||||
}
|
||||
|
||||
public GetEnumerator()
|
||||
{
|
||||
return items.GetEnumerator();
|
||||
}
|
||||
|
||||
public getCount() items.Count;
|
||||
public getLength() items.Length;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
func SequenceEquals(a,b)
|
||||
{
|
||||
const ittra = a.GetEnumerator();
|
||||
const ittrb = b.GetEnumerator();
|
||||
|
||||
defer {
|
||||
ittra.Dispose();
|
||||
ittrb.Dispose();
|
||||
}
|
||||
|
||||
while(true) {
|
||||
const hasa = ittra.MoveNext();
|
||||
const hasb = ittrb.MoveNext();
|
||||
|
||||
if(hasa != hasb) return false;
|
||||
if(hasa)
|
||||
{
|
||||
if(!(hasa.Current == hasb.Current)) return false;
|
||||
}
|
||||
else break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
class Stack
|
||||
{
|
||||
private items = [];
|
||||
|
||||
public Push(val)
|
||||
{
|
||||
items.Insert(0, val);
|
||||
}
|
||||
|
||||
public Pop()
|
||||
{
|
||||
if(items.Count == 0) return null;
|
||||
const val = items[0];
|
||||
items.RemoveAt(0);
|
||||
return val;
|
||||
}
|
||||
|
||||
public Top()
|
||||
{
|
||||
if(items.Count == 0) return null;
|
||||
return items[0];
|
||||
}
|
||||
|
||||
public getCount() items.Count;
|
||||
|
||||
|
||||
public getLength() items.Length;
|
||||
|
||||
public GetEnumerator()
|
||||
{
|
||||
return items.GetEnumerator();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
class Event {
|
||||
private mtx = new Mutex();
|
||||
private cb = [];
|
||||
public Event()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Invoke(sender,e)
|
||||
{
|
||||
mtx.Lock();
|
||||
each(var item : cb)
|
||||
{
|
||||
item(sender,e);
|
||||
}
|
||||
mtx.Unlock();
|
||||
}
|
||||
|
||||
public Subscribe(val)
|
||||
{
|
||||
mtx.Lock();
|
||||
cb.Add(val);
|
||||
mtx.Unlock();
|
||||
}
|
||||
|
||||
public Unsubscribe(val)
|
||||
{
|
||||
mtx.Lock();
|
||||
cb.Remove(val);
|
||||
mtx.Unlock();
|
||||
}
|
||||
|
||||
public operator+(val)
|
||||
{
|
||||
mtx.Lock();
|
||||
cb.Add(val);
|
||||
mtx.Unlock();
|
||||
return this;
|
||||
}
|
||||
|
||||
public operator-(val)
|
||||
{
|
||||
mtx.Lock();
|
||||
cb.Remove(val);
|
||||
mtx.Unlock();
|
||||
return this;
|
||||
}
|
||||
}
|
||||
+1
-9
@@ -10,7 +10,7 @@ class Exception
|
||||
|
||||
public ToString()
|
||||
{
|
||||
var messagePart = $"{Class.Name(this)}: {Message}";
|
||||
var messagePart = $"{Class.Name(this)}: {this.Message}";
|
||||
if(InnerException != undefined && InnerException != null)
|
||||
{
|
||||
var innerEx = InnerException.ToString().Replace("\n","\n\t");
|
||||
@@ -18,12 +18,4 @@ class Exception
|
||||
}
|
||||
return messagePart;
|
||||
}
|
||||
}
|
||||
|
||||
class OutOfRangeException : Exception
|
||||
{
|
||||
public OutOfRangeException(varName,$inner)
|
||||
{
|
||||
Exception($"{varName} is out of range.",inner);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class OutOfRangeException : Exception
|
||||
{
|
||||
public OutOfRangeException(varName,$inner)
|
||||
{
|
||||
Exception($"{varName} is out of range.",inner);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
class ExecutorQueue {
|
||||
private mtx = new Mutex();
|
||||
private items = [];
|
||||
private thread;
|
||||
private running=true;
|
||||
|
||||
public ExecutorQueue()
|
||||
{
|
||||
thread = new Thread(()=>{
|
||||
while(running)
|
||||
{
|
||||
mtx.Lock();
|
||||
if(items.Count == 0)
|
||||
{
|
||||
mtx.Unlock();
|
||||
continue;
|
||||
}
|
||||
const item = items[0];
|
||||
items.RemoveAt(0);
|
||||
mtx.Unlock();
|
||||
if(TypeIsCallable(item))
|
||||
item();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public EnqueueJob(cb)
|
||||
{
|
||||
mtx.Lock();
|
||||
items.Add(cb);
|
||||
mtx.Unlock();
|
||||
}
|
||||
|
||||
public Dispose()
|
||||
{
|
||||
mtx.Lock();
|
||||
running=false;
|
||||
mtx.Unlock();
|
||||
thread.Join();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
func FuncWithThis(
|
||||
function,
|
||||
thisVal
|
||||
)
|
||||
{
|
||||
return ($$args)=>{
|
||||
const newArgs = [thisVal];
|
||||
each(var item : args) newArgs.Add(item);
|
||||
|
||||
return function.Call(newArgs);
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
class MutexLock
|
||||
{
|
||||
private mtx;
|
||||
public MutexLock(mtx)
|
||||
{
|
||||
this.mtx = mtx;
|
||||
mtx.Lock();
|
||||
}
|
||||
|
||||
public Dispose()
|
||||
{
|
||||
mtx.Unlock();
|
||||
}
|
||||
}
|
||||
|
||||
func Lock(mtx)
|
||||
{
|
||||
return new MutexLock(mtx);
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
class Result {
|
||||
private isError=false;
|
||||
private value=null;
|
||||
|
||||
public Result(value, isError)
|
||||
{
|
||||
this.value = value;
|
||||
this.isError = isError;
|
||||
}
|
||||
|
||||
static Error(value)
|
||||
{
|
||||
return new Result(value,true);
|
||||
}
|
||||
|
||||
static OK(value)
|
||||
{
|
||||
return new Result(value,false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public getIsError()
|
||||
{
|
||||
return this.isError;
|
||||
}
|
||||
|
||||
public getValue()
|
||||
{
|
||||
return this.value;
|
||||
}
|
||||
|
||||
|
||||
public Unwrap()
|
||||
{
|
||||
if(isError) throw value;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
|
||||
|
||||
Test("Collections",()=>{
|
||||
Spec("SequenceEquals",()=>{
|
||||
enumerable func myenum()
|
||||
{
|
||||
yield 42;
|
||||
yield 69;
|
||||
yield 128;
|
||||
yield "Hello";
|
||||
}
|
||||
Assert(SequenceEquals("MyString",['M','y','S','t','r','i','n','g']), "SequenceEquals is not functioning correctly, String MyString and array with same chars should return true");
|
||||
Assert(SequenceEquals(myenum(), [42,69,128,"Hello"]), "SequenceEquals is not functioning correctly, enumerable and list should return same result");
|
||||
});
|
||||
Spec("Queue", ()=>{
|
||||
const queue = new Queue();
|
||||
queue.Enqueue("Apple");
|
||||
queue.Enqueue(37);
|
||||
Assert(!TypeIsDefined(queue.Enqueue("My String")), "Queue.Enqueue should not return value, but it does");
|
||||
Expect(queue.Dequeue()).ToBe("Apple");
|
||||
|
||||
Expect(queue.Peek()).LessThan(42);
|
||||
|
||||
Expect(queue.Count).ToBe(2);
|
||||
queue.Dequeue();
|
||||
Expect(queue.Count).ToBe(1);
|
||||
|
||||
queue.Enqueue(4);
|
||||
queue.Enqueue(5);
|
||||
queue.Enqueue(true);
|
||||
|
||||
Assert(SequenceEquals(queue,["My String",4,5,true]), "Queue isn't working correctly");
|
||||
|
||||
});
|
||||
|
||||
Spec("Stack", ()=>{
|
||||
const stack = new Stack();
|
||||
Assert(!TypeIsDefined(stack.Push(42)),"Stack.Push should not return a value, but it does");
|
||||
stack.Push(59);
|
||||
Expect(stack.Count).ToBe(2);
|
||||
Expect(stack.Pop()).ToBe(59);
|
||||
Expect(stack.Top()).ToBe(42);
|
||||
Expect(stack.Pop()).ToBe(42);
|
||||
});
|
||||
|
||||
|
||||
|
||||
});
|
||||
+24
-22
@@ -14,7 +14,7 @@ func cmd(name, args)
|
||||
func main(args)
|
||||
{
|
||||
|
||||
var args2=["-o","./Tesses.CrossLang.BuildEssentials/bin-tmp","-r","./Tesses.CrossLang.BuildEssentials/res","-n","Tesses.CrossLang.BuildEssentials","-v","1.0.0.0-prod","Tesses.CrossLang.BuildEssentials/main.tcross"];
|
||||
var args2=["c","-o","./Tesses.CrossLang.BuildEssentials/bin-tmp","-r","./Tesses.CrossLang.BuildEssentials/res","-n","Tesses.CrossLang.BuildEssentials","-v","1.0.0.0-dev","Tesses.CrossLang.BuildEssentials/main.tcross"];
|
||||
each(var f : FS.Local.EnumeratePaths("./Tesses.CrossLang.BuildEssentials/src"))
|
||||
{
|
||||
if(f.GetExtension() == ".tcross")
|
||||
@@ -22,38 +22,40 @@ func main(args)
|
||||
args2.Add(f.ToString());
|
||||
}
|
||||
}
|
||||
cmd("crossc", args2);
|
||||
cmd("crossvm",["./Tesses.CrossLang.BuildEssentials/bin-tmp/Tesses.CrossLang.BuildEssentials-1.0.0.0-prod.crvm","Tesses.CrossLang.Shell"]);
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-prod.crvm","build","Tesses.CrossLang.PackageServer"]);
|
||||
//cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-prod.crvm","build","Tesses.CrossLang.WebSite"]);
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-prod.crvm","build","Tesses.CrossLang.Std"]);
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-prod.crvm","build","Templates/console"]);
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-prod.crvm","build","Templates/emptyweb"]);
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-prod.crvm","build","Templates/web"]);
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-prod.crvm","build","Templates/template"]);
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-prod.crvm","build","Templates/lib"]);
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-prod.crvm","build","Templates/compiletool"]);
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-prod.crvm","build","Templates/tool"]);
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-prod.crvm","build","Templates/webapp"]);
|
||||
|
||||
|
||||
|
||||
cmd("crosslang", args2);
|
||||
cmd("crosslang",["vm","./Tesses.CrossLang.BuildEssentials/bin-tmp/Tesses.CrossLang.BuildEssentials-1.0.0.0-dev.crvm","Tesses.CrossLang.Shell"]);
|
||||
cmd("crosslang",["vm","./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-dev.crvm","build","Tesses.CrossLang.PackageServer"]);
|
||||
cmd("crosslang",["vm","./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-dev.crvm","build","Tesses.CrossLang.Std"]);
|
||||
cmd("crosslang",["vm","./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-dev.crvm","build","Templates/console"]);
|
||||
cmd("crosslang",["vm","./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-dev.crvm","build","Templates/emptyweb"]);
|
||||
cmd("crosslang",["vm","./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-dev.crvm","build","Templates/web"]);
|
||||
cmd("crosslang",["vm","./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-dev.crvm","build","Templates/template"]);
|
||||
cmd("crosslang",["vm","./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-dev.crvm","build","Templates/lib"]);
|
||||
cmd("crosslang",["vm","./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-dev.crvm","build","Templates/compiletool"]);
|
||||
cmd("crosslang",["vm","./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-dev.crvm","build","Templates/tool"]);
|
||||
cmd("crosslang",["vm","./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-dev.crvm","build","Templates/webapp"]);
|
||||
cmd("crosslang",["vm","./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-dev.crvm","build","Templates/npmweb"]);
|
||||
cmd("crosslang",["vm","./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-dev.crvm","build","Templates/npmwebapp"]);
|
||||
|
||||
/*
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-prod.crvm","build","Tesses.CrossLang.PackageServer"]);
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-prod.crvm","build","Tesses.CrossLang.PackageServer"]);
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-prod.crvm","build","Tesses.CrossLang.PackageServer"]);
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-prod.crvm","build","Tesses.CrossLang.PackageServer"]);
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-prod.crvm","build","Tesses.CrossLang.PackageServer"]);
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-dev.crvm","build","Tesses.CrossLang.PackageServer"]);
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-dev.crvm","build","Tesses.CrossLang.PackageServer"]);
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-dev.crvm","build","Tesses.CrossLang.PackageServer"]);
|
||||
*/
|
||||
cmd("crossvm",["./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-prod.crvm","build","crosslang_shell_archive_maker"]);
|
||||
cmd("crosslang",["vm","./Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-dev.crvm","build","crosslang_shell_archive_maker"]);
|
||||
|
||||
if(args.Length > 1)
|
||||
{
|
||||
if(args[1] == "install")
|
||||
{
|
||||
cmd("crossvm",["crosslang_shell_archive_maker/bin/crosslang_shell_archive_maker-1.0.0.0-prod.crvm", "install"]);
|
||||
cmd("crosslang",["vm","crosslang_shell_archive_maker/bin/crosslang_shell_archive_maker-1.0.0.0-dev.crvm", "install"]);
|
||||
}
|
||||
else if(args[1] == "pack")
|
||||
{
|
||||
cmd("crossvm",["crosslang_shell_archive_maker/bin/crosslang_shell_archive_maker-1.0.0.0-prod.crvm"]);
|
||||
cmd("crosslang",["vm","crosslang_shell_archive_maker/bin/crosslang_shell_archive_maker-1.0.0.0-dev.crvm"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
"project_dependencies": [
|
||||
"..\/Tesses.CrossLang.BuildEssentials"
|
||||
],
|
||||
"version": "1.0.0.0-prod"
|
||||
"version": "1.0.0.0-dev"
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
var name = "Tesses.CrossLang.ShellPackage-1.0.0.0-prod.crvm";
|
||||
var name = "Tesses.CrossLang.ShellPackage-1.0.0.0-dev.crvm";
|
||||
func main(args)
|
||||
{
|
||||
create_archive();
|
||||
@@ -43,9 +43,9 @@ func create_archive()
|
||||
|
||||
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");
|
||||
copyFile("Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Args-1.0.0.0-dev.crvm", shell / "Tesses.CrossLang.Args-1.0.0.0-dev.crvm");
|
||||
copyFile("Tesses.CrossLang.Shell/bin/Tesses.CrossLang.BuildEssentials-1.0.0.0-dev.crvm", shell / "Tesses.CrossLang.BuildEssentials-1.0.0.0-dev.crvm");
|
||||
copyFile("Tesses.CrossLang.Shell/bin/Tesses.CrossLang.Shell-1.0.0.0-dev.crvm", shell / "Shell.crvm");
|
||||
copyFile("Tesses.CrossLang.Reference/bin/Tesses.CrossLang.Reference-1.0.0.0-dev.crvm", "Reference.crvm");
|
||||
var devStudio = r / "DevStudio";
|
||||
tmpFS.CreateDirectory(devStudio);
|
||||
@@ -68,14 +68,16 @@ func create_archive()
|
||||
|
||||
|
||||
|
||||
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");
|
||||
copyFile("Templates/emptyweb/bin/Tesses.CrossLang.Template.EmptyWebsite-1.0.0.0-prod.crvm", templates / "emptyweb.crvm");
|
||||
copyFile("Templates/tool/bin/Tesses.CrossLang.Template.Tool-1.0.0.0-prod.crvm", templates / "tool.crvm");
|
||||
copyFile("Templates/webapp/bin/Tesses.CrossLang.Template.WebApp-1.0.0.0-prod.crvm", templates / "webapp.crvm");
|
||||
copyFile("Templates/compiletool/bin/Tesses.CrossLang.Template.CompileTool-1.0.0.0-dev.crvm", templates / "compiletool.crvm");
|
||||
copyFile("Templates/console/bin/Tesses.CrossLang.Template.Console-1.0.0.0-dev.crvm", templates / "console.crvm");
|
||||
copyFile("Templates/lib/bin/Tesses.CrossLang.Template.Library-1.0.0.0-dev.crvm", templates / "lib.crvm");
|
||||
copyFile("Templates/template/bin/Tesses.CrossLang.Template.Template-1.0.0.0-dev.crvm", templates / "template.crvm");
|
||||
copyFile("Templates/web/bin/Tesses.CrossLang.Template.Website-1.0.0.0-dev.crvm", templates / "web.crvm");
|
||||
copyFile("Templates/emptyweb/bin/Tesses.CrossLang.Template.EmptyWebsite-1.0.0.0-dev.crvm", templates / "emptyweb.crvm");
|
||||
copyFile("Templates/tool/bin/Tesses.CrossLang.Template.Tool-1.0.0.0-dev.crvm", templates / "tool.crvm");
|
||||
copyFile("Templates/webapp/bin/Tesses.CrossLang.Template.WebApp-1.0.0.0-dev.crvm", templates / "webapp.crvm");
|
||||
copyFile("Templates/npmwebapp/bin/Tesses.CrossLang.Template.NPMWebApp-1.0.0.0-dev.crvm", templates / "npmwebapp.crvm");
|
||||
copyFile("Templates/npmweb/bin/Tesses.CrossLang.Template.NPMWebsite-1.0.0.0-dev.crvm", templates / "npmweb.crvm");
|
||||
|
||||
var packageCache = r / "PackageCache";
|
||||
|
||||
@@ -84,18 +86,18 @@ func create_archive()
|
||||
tmpFS.CreateDirectory(packageCache / "Tesses.CrossLang.BuildEssentials");
|
||||
tmpFS.CreateDirectory(packageCache / "Tesses.CrossLang.Markup");
|
||||
tmpFS.CreateDirectory(packageCache / "Tesses.CrossLang.Std");
|
||||
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");
|
||||
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.Std/bin/Tesses.CrossLang.Std-1.0.0.0-prod.crvm", packageCache / "Tesses.CrossLang.Std" / "1.0.0.0-prod");
|
||||
copyFile("Tesses.CrossLang.Args/bin/Tesses.CrossLang.Args-1.0.0.0-dev.crvm", packageCache / "Tesses.CrossLang.Args" / "1.0.0.0-prod");
|
||||
copyFile("Tesses.CrossLang.BuildEssentials/bin/Tesses.CrossLang.BuildEssentials-1.0.0.0-dev.crvm", packageCache / "Tesses.CrossLang.BuildEssentials" / "1.0.0.0-prod");
|
||||
//copyFile("Tesses.CrossLang.Markup/bin/Tesses.CrossLang.Markup-1.0.0.0-dev.crvm", packageCache / "Tesses.CrossLang.Markup" / "1.0.0.0-prod");
|
||||
copyFile("Tesses.CrossLang.Args/bin/Tesses.CrossLang.Args-1.0.0.0-dev.crvm", packageCache / "Tesses.CrossLang.Args" / "1.0.0.0-prod");
|
||||
copyFile("Tesses.CrossLang.Std/bin/Tesses.CrossLang.Std-1.0.0.0-dev.crvm", packageCache / "Tesses.CrossLang.Std" / "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",
|
||||
repo = "https://git.tesses.org/tesses50/crosslangextras",
|
||||
homepage = "https://crosslang.tesseslanguage.com/"
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
console: a console application (or webserver)
|
||||
lib: a library
|
||||
webapp: A web app (for webview or eventual cloud OS)
|
||||
webapp: A web app (for webview or android, can specify port on cli)
|
||||
template: used for project templates
|
||||
compile_tool: run before source is compiled for project if it is in the dependency tree for the project (and is not linked to said projects)
|
||||
tool: a tool invokable via crosslang (gets Tesses.CrossLang.Args for free)
|
||||
@@ -7,7 +7,7 @@
|
||||
"vscode": "^1.107.0"
|
||||
},
|
||||
"publisher": "tesses50",
|
||||
"repository": "https://onedev.site.tesses.net/crosslang/crosslangextras",
|
||||
"repository": "https://git.tesses.org/tesses50/crosslangextras",
|
||||
"categories": [
|
||||
"Programming Languages"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user