You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: site/en-us/contributing.md
+26-1
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,19 @@ Chore|ci|docs|feat|fix|perf|refactor|revert|style|test|temp; `scope` is required
39
39
7. If a pull request has multiple commits, rebase the multiple commit record to one commit record.
40
40
41
41
## Development Workflow
42
-
After you clone the `@alifd/next` and install the dependencies with `npm install`, you can also run the following commands:
42
+
43
+
1. Fork this repo to your own github account (step in the page https://github.com/alibaba-fusion/next , click on the fork button in the upper right cornor)
44
+
2. Download the code you just forked on https://github.com/[your account]/next
45
+
```
46
+
git clone git@github.com:[your account]/next.git
47
+
```
48
+
3. Step in the files, create a new branch and start your work
49
+
```
50
+
cd next
51
+
git checkout -b fix-issue-100
52
+
```
53
+
54
+
After doing all the stuff above and install the dependencies with `npm install`, you can also run the following commands:
43
55
44
56
*`npm run dev component` start the debug page of the specified component
45
57
@@ -53,6 +65,19 @@ After you clone the `@alifd/next` and install the dependencies with `npm install
53
65
54
66
*`npm run pack` package the file and generate the dist directory
55
67
68
+
## Notes
69
+
70
+
1. To support SSR (Server-Side-Render):
71
+
- Avoid using client variables such as windows as far as possible ( There is no window object on the server side. If you need to use it, you need to judge whether it exists step by step from the window. )
72
+
- Use `typeof` to check whether a client object exits or not
- Avoid mounting timers (possible memory leaks) to global objects such as windows
79
+
- Avoid uncertain outputs such as random () (the output is predictable, independent of environment, etc.)
80
+
2. The variable of SASS color calculation needs to start with `$color-calcualte-`, and should be written to `variable.scss` (not to `main.scss`), refer to `Search`, see #1029.
0 commit comments