From 29145604be42d4b429e65fccfe021847bc99851c Mon Sep 17 00:00:00 2001 From: fyears Date: Sun, 24 Oct 2021 13:12:45 +0800 Subject: [PATCH] add code design --- docs/code_design.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 docs/code_design.md diff --git a/docs/code_design.md b/docs/code_design.md new file mode 100644 index 0000000..7a8df80 --- /dev/null +++ b/docs/code_design.md @@ -0,0 +1,13 @@ +# Code Design + +## Code Organization + +1. Every function except `main.ts` should be pure. Pass any stateful information in parameters. + +2. `misc.ts` should not depend on any other written code. + +3. Each storage code should not depend on `sync.ts`. + +## File and Folder Representation + +While writing sync codes, folders are always represented by a string ending with `/`.