Skip to content

Commit

Permalink
docs: add basic syntax for transflow
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Dec 31, 2021
1 parent 051f436 commit 5f5980e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Component, Event, EventEmitter, h, Prop, State} from '@stencil/core';
import QuakeDown from '../../markdown/quake-down';
import {CodeType, QuakeDownType} from "../../markdown/quake-down.type";
import {CodeType, QuakeDownType} from '../../markdown/quake-down.type';

export interface Link {
entry_type: String,
Expand Down Expand Up @@ -99,8 +99,12 @@ export class QuakeRender {
switch (code.code_type) {
case CodeType.Graph:
out = this.renderGraph(code);
break;

case CodeType.Transflow:
out = this.renderTransflow(code);
break;

default:
out =
<pre class={'language-' + code.lang}><code class={'language-' + code.lang} innerHTML={code.text}/></pre>
Expand Down Expand Up @@ -136,6 +140,10 @@ export class QuakeRender {
}
}

private renderTransflow(_code: QuakeDownType.Code) {
return <graph-transflow />
}

private tableToJson(code: QuakeDownType.Code): QuakeDownType.Table | null {
let data = this.quakeDown.build_data(code.text);
for (let datum of data) {
Expand Down
14 changes: 14 additions & 0 deletions quake_webapp/quake-render/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@
| Thur | 8.0 | 6.0 | 6.0 |
```
```@transflow('from('table').to(<quake-timeline>).map('table.name => title, table.date => date')');
| name | languages | description | link |
|----------|------------|-------------|--------------|
| Coco | Rust | An effective DevOps analysis and auto-suggest tool。Coco 是一个研发效能分析工具,如团队发展现状(根据架构复杂度及行数变更)、团队演进、历史分析等。生成可视化报告及对应的改进建议。 | https://github.com/inherd/coco |
| SQLing | Golang | Build domain model from MySQL schema | https://github.com/inherd/sqling |
| Unflow | Rust | unflow 是一个低代码、无代码设计语言。unFlow is a Design as Code implementation, a DSL for UX & backend modeling. DSL to Sketch file, Sketch to DSL, DSL to code. | https://github.com/inherd/unflow |
| Modeling | Rust | Modeling 是一个基于代码的领域模型生成工具,支持 Java、Cpp、TypeScript、Golang 等语言。Modeling is a tools to analysis different languages by Ctags | https://github.com/inherd/modeling |
| Writing | Rust | A document-code sync tools for document engineering. Writing 是一个自动 “文档-代码” 同步工具。解析 Markdown 中的代码定义,读取目标代码,并嵌入到新的文档中。 | https://github.com/inherd/writing |
| Guarding | Rust | Guarding 是一个用于 Java、JavaScript、Rust、Golang 等语言的架构守护工具。借助于易于理解的 DSL,来编写守护规则。Guarding is a guardians for code, architecture, layered. | https://github.com/inherd/guarding |
| Forming | Rust | Forming, is a lightweight architecture as code language. 轻量级架构即代码语言 | https://github.com/inherd/forming |
| Uncode | TypeScript, Rust | Uncode is a conceptual IDE designed for the cloud development, also a cloud-native low-code software development enviorment. Uncode 是一个面向云研发时代设计的下一代概念性 IDE。 | https://github.com/inherd/uncode |
```
:Test:
```javascript
Expand Down
3 changes: 3 additions & 0 deletions quake_webapp/quake-render/src/markdown/quake-down.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export enum CodeType {
Chart = "Chart",
Example = "Example",
Repl = "Repl",
Transflow = "Transflow",
Run = "Run",
}

Expand All @@ -20,6 +21,8 @@ export function CodeTypeFromStr(text: String) {
return CodeType.Repl;
case "run":
return CodeType.Run;
case "transflow":
return CodeType.Transflow;
default:
return CodeType.Unknown;
}
Expand Down

0 comments on commit 5f5980e

Please sign in to comment.