lemanschik / stealify-module

A Stealify Module to Use Stealify Lang With ECMAScript via import() .lang(/* Stealify Lang YourLang Implementation*/)
0 stars 0 forks source link

A Stealify Module to Use Stealify Lang With ECMAScript via import() .lang(/* Stealify Lang YourLang Implementation*/) #1

Open lemanschik opened 1 year ago

lemanschik commented 1 year ago

A Stealify Module to Use Stealify Lang With ECMAScript via import() .lang(/ Stealify Lang YourLang Implementation/)

// Your lang gets executed as (params)=>myLang`${params.value}`
import() .registerLang(langName,/* Stealify Lang YourLang Implementation*/).instruction('myLang', (params)=>``);
import() .instruction('myLang', (params)=>``) // returns instruction readable if Task has watch support also writeable 

const runServerInstruction = await import() .instruction('myLang', (params)=>`${params.chromium` bla.server.js`} https://yourdomain.com`);
lemanschik commented 1 year ago

merge in examples from the tag-html tagged html research modules.

lemanschik commented 1 year ago

deprecated: In favor of Stealify Lang and its Module System as also Language Implementation Framework.

Stealify Lang Modules are much more great the allows you to express a html module like

const html = await import('component:stealify/lang/html');
const instruction = import('html:instruction');
instruction('html', js`(params) => ${`some string returning html`}`))
instruction('html', (params) => ${`some string returning html`})
const html = await import('stealify:lang/html');
const { htmlDoc, appendDoc } = await import('stealify:lang/html/doc')
const stream = html`<div><h1>Hello `;
stream.writeable.getWriter().write(' World!')
stream.writeable.getWriter().write(' Yes this Streams </h1>')
stream.writeable.getWriter().write('<div id="app">Hello App');
stream.readable.pipeThroug(new htmlDoc()) // => returns body use it with body.querySelectorAll('div').forEach((div)=>document.body.appendChild(div));
lemanschik commented 1 year ago

Stealify Lang Html uses a global mutation queue you can declarativ register stealify lang html components which will then you can manage html components via component-manager/stealify/lang/html as html is a first class citizen you can directly use the component manager with the html: protocol it returns all rendered or rendering doc instances to access the html elements.