diff --git a/sui/README.md b/sui/README.md new file mode 100644 index 00000000..2a682b1e --- /dev/null +++ b/sui/README.md @@ -0,0 +1,29 @@ +# SUI + +SUI is a full-stack web development tool that allows you to create web applications using HTML, CSS, and Typescript/JavaScript. + +It is designed to be simple and easy to use. If you are familiar with HTML, CSS, and Typescript/JavaScript, you can start using SUI right away. + +No dependencies required, no build tools required, no complex frameworks required, just write your HTML, CSS, and TS/JS code, and you are good to go. + +## Demo Application + +[https://github.com/YaoApp/yao-startup-webapp](https://github.com/YaoApp/yao-startup-webapp) + +## Commands + +- `yao sui watch` - Watch for changes in the templates directory and compile them into a single SUI file. +- `yao sui build` - Compile the templates into a single SUI file. +- `yao sui trans` - Generate the i18n translation files, and compile the templates. you can specify the translator automatically translate the text with `trans` attribute. + +## Usage + +Comming soon... + +## About SUI + +SUI is a part of the Yao project, which is a collection of tools for web development. + +SUI name comes from the chinese word "随" which means "follow" or "accompany", it's one of the sixteenth hexagrams of the I Ching, and you can think of SUI as a tool that follows you in your web development journey. + +SUI name also comes from the word "SUI" which means "simple user interface", and you can think of SUI as a tool that makes it easy to create web applications. diff --git a/sui/storages/local/page_test.go b/sui/storages/local/page_test.go index cd6a7d21..62badeed 100644 --- a/sui/storages/local/page_test.go +++ b/sui/storages/local/page_test.go @@ -60,7 +60,7 @@ func TestTemplatePageTree(t *testing.T) { t.Fatalf("Pages error: %v", err) } - if len(pages) < 2 { + if len(pages) < 4 { t.Fatalf("Pages error: %v", len(pages)) } @@ -70,8 +70,8 @@ func TestTemplatePageTree(t *testing.T) { t.Fatalf("Pages error: %v", len(pages[1].Children)) } - assert.NotEmpty(t, pages[2].Children[0].Children) - if len(pages[2].Children[0].Children) < 2 { + assert.NotEmpty(t, pages[3].Children[0].Children) + if len(pages[3].Children[0].Children) < 2 { t.Fatalf("Pages error: %v", len(pages[2].Children[0].Children)) } }