Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Commit

Permalink
docs: update English documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-soft committed Jun 16, 2019
1 parent d4a022e commit 5049744
Show file tree
Hide file tree
Showing 5 changed files with 174 additions and 23 deletions.
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at root@lc-soft.io. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
24 changes: 24 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Contributing to Trad

Trad is a language developed to implement the author's personal needs. One's ability is limited, and there are very few people in the open source community who are willing to waste time writing code for other people's projects. Therefore, the author only chooses to develop the features he needs and does not intend to set a lofty goal for the project and then one person is responsible for all the work.

If you want Trad to be a mature, complete programming language and have the intention to participate, please read the [Open Source Guides](https://opensource.guide/how-to-contribute/) and the [Code Of Conduct](CODE_OF_CONDUCT.md) first, then continue reading the following.

## Issues

You must complete the Issue content as required by the Issue template, and you should describe the content in a simple and clear way, which helps to reduce the difficulty of understanding.

## Pull Requests

To enable us to quickly review and accept your pull requests, always create one pull request per issue and [link the issue in the pull request](https://github.com/blog/957-introducing-issue-mentions). Never merge multiple requests in one unless they have the same root cause. Be sure to follow our coding style and keep code changes as small as possible. Avoid pure formatting changes to code that has not been modified otherwise. Pull requests should contain tests whenever possible.

### Where to Contribute

Check out the [full issues list](https://github.com/lc-soft/trad/issues) for a list of all potential areas for contributions. Note that just because an issue exists in the repository does not mean we will accept a contribution to the core editor for it. There are several reasons we may not accept a pull request like:

- Performance - One of Visual Studio Code's core values is to deliver a lightweight code editor, that means it should perform well in both real and perceived performance.
- Architectural - The team and/or feature owner needs to agree with any architectural impact a change may make. Things like new extension APIs must be discussed with and agreed upon by the feature owner.

To improve the chances to get a pull request merged you should select an issue that is labelled with the [`help-wanted`](https://github.com/lc-soft/trad/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) or [`bug`](https://github.com/lc-soft/trad/issues?q=is%3Aopen+is%3Aissue+label%3A"bug") labels. If the issue you want to work on is not labelled with help-wanted or bug, you can start a conversation with the issue owner asking whether an external contribution will be considered.

To avoid multiple pull requests resolving the same issue, let others know you are working on it by saying so in a comment.
2 changes: 1 addition & 1 deletion CONTRIBUTING.zh-cn.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Trad 贡献指南

Trad 是一个为满足作者的个人需求而开发的语言,作者深知个人的能力有限,也知道在现在的开源社区氛围下不会有多少人愿意浪费时间给别人的项目写代码,所以,只选择开发自己所需的功能,并没有打算给这个项目设定远大的目标然后一个人负责所有工作。
Trad 是一个为满足作者的个人需求而开发的语言,个人的能力终究是有限,而在的开源社区氛围下不会有多少人愿意浪费时间给别人的项目写代码,所以,作者只选择开发自己所需的功能,并没有打算给这个项目设定远大的目标然后一个人负责所有工作。

如果你希望 Trad 能成为一个成熟、完整的编程语言,并有意向参与进来,请先阅读[《开源指南》](https://opensource.guide/zh-cn/how-to-contribute/)[《行为准则》](CODE_OF_CONDUCT.zh-cn.md),然后继续阅读以下内容。

Expand Down
72 changes: 61 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,81 @@
# Trad

Trad is a lightweight and portable language for building user interfaces.
## Introduction

## Features
**A lightweight and C based language for building user interfaces.**

- The syntax is similar to JavaScript and can be compiled to readable, standards-based C.
- Easily write UI using [JSX](https://facebook.github.io/jsx/) syntax without writing complex C code for data binding and event binding.
- Cross platform (Linux, Windows,~~Mac OS~~)
Trad is:

- **Base on C:** Trad compiles to readable, standards-based C. Its relationship with C is like the relationship between TypeScript and JavaScript.
- **Optimized for UI:** Simplify your development work with syntax features specialized around the needs of user interface creation.
- **Easy to use:** Designed for C developers' usage habits, you can get started quickly without having to spend a lot of time reading complex documents.
- **Not Productive:** The current version of the architecture design has not been stable and is only used for technical communication, not for production.
- **Community-driven:** The source code is small and easy to read and modify. Anyone can participate in the design of language specifications, and this project development status is affected by community activity.
- **Cross platform:** Support for Linux and Windows desktop platforms, but does not support Mac OS and mobile platforms

Trad's syntax is based on JavaScript, it has good compatibility with existing JavaScript development tools/editor extensions, and it won't change much for a long time, so you can temporarily write it as JavaScript.

![Example](images/example.gif)

## Installing

npm install -g trad

## Usage

Compile to C source file:

tradc example.jsx

Compile to binary file:

gcc -c example.jsx.c
gcc -o example example.jsx.o -lLCUI

**Note:** The UI layer of the Trad application is powered by [LCUI](https://github.com/lc-soft/LCUI) and you should install it before compiling.

The current version only implements the features required for the smallest sample application and cannot be applied to actual projects. Please wait for subsequent updates.

## Contribute

There are many ways to contribute to Trad.
There are many ways to [contribute](CONTRIBUTING.md) to Trad.

- [Submit bugs](https://github.com/lc-soft/trad/issues) and help us verify fixes as they are checked in.
- Vote and discuss participation in feature requests.
- Review the [source code changes](https://github.com/lc-soft/trad/pulls).
- [Contribute bug fixes](CONTRIBUTING.md).
- Read the [language specification](docs/spec.md).
- Check [our projects list](https://github.com/lc-soft/trad/projects) to see what we plan to do, what we are doing, and what you can do.
- Read the [language specification](docs/README.md)

Trad has adopted the code of conduct defined by the Contributor Covenant. This document is used across many open source communities, and we think it articulates our values well. For more, see the [Code of Conduct](CODE_OF_CONDUCT.md).

## Roadmap

## Documentation
The main tasks are listed below, for detailed work plans and progress please see the [project boards](https://github.com/lc-soft/trad/projects).

- Quick tutorial
- [Language specification](docs/spec.md)
- Core
- basic syntax
- Basic data type
- Compatible with C syntax
- Template literals (Template strings)
- Function nesting and Closures
- Decorator
- await/async
- Standard library
- LCUI extension
- Redesign language binding of LCUI
- Implement the Widget.render() method
- `@uithread` decorator
- Tool chain
- Compiler
- Command-line interface
- Friendly error output
- Line comments
- Package manager
- Building tool
- Documention
- FAQ
- Lnaguage specification
- Tutorial

## License

Expand Down
23 changes: 12 additions & 11 deletions README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

Trad 是一个专为简化 C 开发而设计的编程语言,它:

- **基于 C:** 经编译器编译后能得到干净可读的标准 C 代码
- **专为 UI 优化:** 使用专为构建 UI 而设计的语法特性,能让构建 UI 变得更加容易
- **基于 C:** 经编译器编译后能得到干净可读的标准 C 代码,其与 C 的关系就像 TypeScript 与 JavaScript 一样
- **专为 UI 优化:** 使用专为构建 UI 而设计的语法特性让构建 UI 变得更加容易
- **易于使用:** 针对 C 开发者的使用习惯而设计,无需花费大量时间查阅复杂的文档就能快速上手
- **不可用于生产:** 当前版本仅供技术交流,内部设计还未稳定,不适合在正式的产品中应用
- **由社区驱动:** 体积小,源代码易于阅读和修改,任何人都可以参与制定语言规范
- **由社区驱动:** 源代码体积小,易于阅读和修改,任何人都可以参与制定语言规范,项目的发展状态受由社区活跃度影响
- **跨平台:** 支持 Linux 和 Windows 桌面端,但不支持 Mac OS、移动端

Trad 的语法基于 JavaScript,与现有的 JavaScript 开发工具/编辑器扩展有着良好的兼容性,而且在很长的一段时间内不会有重大变化,所以,你可以暂时将它当作 JavaScript 来写。
Trad 的语法基于 JavaScript,它与现有的 JavaScript 开发工具/编辑器扩展有着良好的兼容性,而且在很长的一段时间内不会有重大变化,所以,你可以暂时将它当作 JavaScript 来写。

![Example](images/example.gif)

Expand All @@ -36,7 +36,7 @@ Trad 的语法基于 JavaScript,与现有的 JavaScript 开发工具/编辑器

## 贡献

有很多方式参与贡献 Trad:
有很多方式[参与贡献](CONTRIBUTING.zh-cn.md) Trad:

- [反馈问题](https://github.com/lc-soft/trad/issues)并在问题关闭时帮助我们验证它们是否已经修复
- 参与功能设计相关问题的投票和讨论
Expand All @@ -49,26 +49,27 @@ Trad 的语法基于 JavaScript,与现有的 JavaScript 开发工具/编辑器

## 路线图

以下只列出大概的任务,详细的任务计划和进度可访问[项目看板](https://github.com/lc-soft/trad/projects)页面了解
以下只列出了主要的任务,如需了解详细的任务计划和进度,请查看[项目看板](https://github.com/lc-soft/trad/projects)

- 核心
- 兼容 C 的语法
- 基础语法
- 基础数据类型
- 匿名函数或闭包
- 兼容 C 的语法
- 模板字符串
- 闭包
- 装饰器
- await/async
- 标准库
- LCUI 扩展
- 重新设计 LCUI 的语言绑定
- Widget.render() 方法
- uithread 装饰器
- 实现 Widget.render() 方法
- `@uithread` 装饰器
- 工具链
- 编译器
- 命令行界面(CLI)
- 友好的错误输出
- 行注释
- 包管理
- 包管理器
- 构建工具
- 文档
- 常见问题及解答
Expand Down

0 comments on commit 5049744

Please sign in to comment.