summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2017-05-21 09:06:14 +0800
committerGitHub <[email protected]>2017-05-21 09:06:14 +0800
commitb1470041c2eb3682b463e0f13192dd946416163c (patch)
tree267309e76d368a12d25ab283564fa7b2e08e03b2
parent365d5076866ae28414c34d406615b9706858c4a5 (diff)
parentb54b263ab4f05564cc463a53d1efedc1c3703f2f (diff)
Merge pull request #108 from TitanSnow/CONTRIBUTING
add `Some suggestion on developing` in CONTRIBUTING.md
-rw-r--r--CONTRIBUTING.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 16d7cdc49..297944137 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -23,6 +23,22 @@ try to follow these guidelines when you do so.
* Ensure your edited codes with four spaces instead of TAB.
* Please commit code to `dev` branch and we will merge into `master` branch in feature
+### Some suggestion on developing
+
+#### Speed up build
+
+* Use `ccache`.
+* Pre-build by `make build -j`. Then if you do no modification on files in dir `core`, just use `scripts/get.sh __local__ __install_only__` to quickly install.
+* Use a real xmake executable file with environment variable `XMAKE_PROGRAM_DIR` set to dir `xmake` in repo path so that no installation is needed.
+
+#### Understand API layouts
+
+* Action scripts, plugin scripts and user's `xmake.lua` run in sandbox. Sandbox API is in `xmake/core/sandbox`.
+* Util scripts run in base lua environment. Base API is in `xmake/core/base`
+* Native API includes lua API and xmake ext API written in C in `core/src/xmake`
+
+For example, to copy a directory in sandbox, calling link is: `sandbox_os.cp()` -> `os.cp()` -> `xm_os_cpdir()` -> `tb_directory_copy()`
+
# 贡献代码
如果你发现一些问题,或者想新增或者改进某些新特性,或者想贡献一个新的模块