add code design
This commit is contained in:
parent
21f8789b27
commit
29145604be
13
docs/code_design.md
Normal file
13
docs/code_design.md
Normal file
@ -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 `/`.
|
||||||
Loading…
Reference in New Issue
Block a user