Skip to content

Commit 40c5f31

Browse files
committed
docs: update README
1 parent 6402813 commit 40c5f31

File tree

3 files changed

+79
-40
lines changed

3 files changed

+79
-40
lines changed
File renamed without changes.

README.md

Lines changed: 40 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,50 @@ From your command line:
2020
# Install command line tool
2121
npm install -g @lcui/cli
2222

23-
# Create project
24-
lcui create my-lcui-app
23+
# Clone this repository
24+
git clone https://github.com/lcui-dev/lcui-quick-start.git
25+
26+
# Go into the repository
27+
cd lcui-quick-start
28+
29+
# Install dependencies
30+
npm install
31+
32+
# Build
33+
lcui build
34+
35+
# Run the app
36+
xmake run app
2537
```
2638

2739
## What's included
2840

29-
- Some resource files.
30-
- Configuration file for [XMake](https://xmake.io/).
31-
- Simple data storage implementation in `src/lib/store.c`.
32-
- [.scss](https://sass-lang.com/guide) files for describe the user interface style.
33-
- Some tsx files used to describe the structure of the user interface. You can refer to it to write stateless components using the TypeScript language and React library.
34-
- `about` component for display app information.
35-
- `home` page that implements simple layout and interaction.
36-
37-
## Project Structure
38-
39-
- **`app`**: contains the resource files required for the application to run. You can use it as the working directory of the application, and when you publish your application, you only need to package the files in that directory.
40-
- **`build`**: contains build tool output files.
41-
- **`src`**: contains the source code.
42-
- **`assets`**: contains resource files.
43-
- **`style`**: contains the source code of stylesheets. You can put [.scss](https://sass-lang.com/guide) files here.
44-
- **`components`**: Contains source code for components.
45-
- **`pages`**: Contains source code for pages.
46-
- **`lib`**: contains the base library code.
41+
- `app/`: Directory for storing source code and resources based on application routers.
42+
- `about/`: Directory for the about page.
43+
- `logo.png`: Project icon file.
44+
- `page.c`: C source file for the about page.
45+
- `page.h`: C header file for the about page.
46+
- `page.tsx`: TypeScript source file for the about page.
47+
- `page.tsx.h`: page.tsx compiled into C source code, included by page.c.
48+
- `styles.module.scss`: CSS module.
49+
- `styles.module.scss.h`: CSS module compiled into C code, included by page.tsx.h.
50+
- `global.css`: Global CSS styles.
51+
- `page.c`: C source file for the main page.
52+
- `page.h`: C header file for the main page.
53+
- `page.tsx`: TypeScript source file for the main page.
54+
- `page.tsx.h`: page.tsx compiled into C code, included by page.c.
55+
- `layout.tsx`: Layout containing UI shared with subpages.
56+
- `main.c`: Main entry source file containing the source code for `main()` function.
57+
- `main.h`: Main entry header file containing headers and functions required by `main()` function.
58+
- `.clang-format`: Code formatting configuration file.
59+
- `xmake.lua`: Configuration file for [XMake](https://xmake.io/).
60+
- `package.json`: Description of the basic information and dependencies of the application.
61+
- `tailwind.config.js`: Configuration file for [Tailwind CSS](https://tailwindcss.com/), enabling only partial plugins for LCUI features.
62+
- `postcss.config.js`: Configuration file for [PostCSS](https://postcss.org/).
63+
- `version.rc`: Resource file describing the icon and information of the Windows executable.
64+
- `logo.ico`: Icon file for the Windows executable.
65+
- `tsconfig.json`: [TypeScript configuration file](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html).
66+
4767

4868
## License
4969

README.zh-cn.md

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,49 @@
2020
# 安装命令行工具
2121
npm install -g @lcui/cli
2222

23-
# 创建项目
24-
lcui create my-lcui-app
23+
# 克隆代码库
24+
git clone https://gitee.com/lcui-dev/lcui-quick-start.git
25+
26+
# 进入代码库目录
27+
cd lcui-quick-start
28+
29+
# 安装依赖
30+
npm install
31+
32+
# 构建
33+
lcui build
34+
35+
# 运行
36+
xmake run app
2537
```
2638

2739
## 包含什么
2840

29-
- 一些资源文件。
30-
- [XMake](https://xmake.io/) 的配置文件。
31-
- 简单的数据存储操作实现,在 `src/lib/store.c` 中可找到。
32-
- 用于描述用户界面样式的 [.scss](https://sass-lang.com/guide) 文件。
33-
- 用于描述用户界面结构的 tsx 文件。你可以参考它使用 TypeScript 语言和 React 库编写无状态组件。
34-
- 用于显示应用程序信息的 `about` 组件。
35-
- 实现了简单布局和交互的 `home` 页面。
36-
37-
## 项目结构
38-
39-
- **`app`**: 包含应用程序运行所需的资源文件。你可以将它当成应用程序的工作目录,在发布应用程序时你只需要打包这个目录内的文件。
40-
- **`build`**: 包含构建工具输出的文件。
41-
- **`src`**: 包含源代码。
42-
- **`assets`**: 包含资源文件。
43-
- **`style`**: 包含样式表的源代码。你可以将 [.scss](https://sass-lang.com/guide) 文件放到这里。
44-
- **`components`**: 包含组件的源代码。
45-
- **`pages`**: 包含页面的源代码。
46-
- **`lib`**: 包含基础库的源代码。
41+
- `app/`:用于存放基于应用路由器的源码和资源。
42+
- `about/`: 关于页的目录。
43+
- `logo.png`:项目图标文件。
44+
- `page.c`: 关于页的 C 源文件。
45+
- `page.h`: 关于页的 C 头文件。
46+
- `page.tsx`: 关于页的 TypeScript 源文件。
47+
- `page.tsx.h`: 已编译为 C 源码的 page.tsx,供 page.c 包含。
48+
- `styles.module.scss`: CSS 模块。
49+
- `styles.module.scss.h`: 已编译为 C 代码的 CSS 模块,供 page.tsx.h 包含。
50+
- `global.css`: 全局 CSS 样式。
51+
- `page.c`: 主页的 C 源文件。
52+
- `page.h`: 主页的 C 头文件。
53+
- `page.tsx`: 主页的 TypeScript 源文件。
54+
- `page.tsx.h`: 已编译为 C 代码的 page.tsx,供 page.c 包含。
55+
- `layout.tsx`: 布局,包含与子页面共享的 UI。
56+
- `main.c`: 主入口源文件,包含 `main()` 函数源码。
57+
- `main.h`: 主入口头文件,包含 `main()` 函数所依赖的头文件和函数。
58+
- `.clang-format`: 代码格式化配置文件。
59+
- `xmake.lua`: [XMake](https://xmake.io/) 的配置文件。
60+
- `package.json`: 描述应用程序的基本信息和依赖项。
61+
- `tailwind.config.js`: [Tailwind CSS](https://tailwindcss.com/) 的配置文件,针对 LCUI 的特性仅开启了部分插件。
62+
- `postcss.config.js`: [PostCSS](https://postcss.org/) 的配置文件。
63+
- `version.rc`: 资源文件,用于描述 Windows 可执行文件的图标和信息。
64+
- `logo.ico`: 图标文件,用于 Windows 可执行文件的图标。
65+
- `tsconfig.json`: [TypeScript 配置文件](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html)
4766

4867
## 许可
4968

0 commit comments

Comments
 (0)