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
* Add .nvmrc
because build requires node v10.x.x (fails with v12.x.x)
* Format CONTRIBUTING.md with prettier
* Add @baremetalfreak as a contributor
* Add engines/node so that yarn fails whith wrong node version
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+59-24Lines changed: 59 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,27 +10,46 @@
10
10
11
11
## Code of Conduct
12
12
13
-
We have a code of conduct you can find [here](./CODE_OF_CONDUCT.md) and every contributor is expected to obey the rules therein. Any issues or PRs that don't abide by the code of conduct may be closed.
13
+
We have a code of conduct you can find [here](./CODE_OF_CONDUCT.md) and every
14
+
contributor is expected to obey the rules therein. Any issues or PRs that don't
15
+
abide by the code of conduct may be closed.
14
16
15
17
## Code Organization
16
18
17
-
The CodeSandbox client is currently divided in to 5 parts. We use `lerna` to share dependencies between these parts.
19
+
The CodeSandbox client is currently divided in to 5 parts. We use `lerna` to
20
+
share dependencies between these parts.
18
21
19
22
-`app`: The editor, the search, profile page, the embed and the sandbox.
20
23
-`homepage`: The Gatsby website of the homepage.
21
24
-`common`: All common parts between these packages, reusable JS.
22
-
-`codesandbox-api`: The npm package that's responsible for communication between the sandbox and the editor.
23
-
-`codesandbox-browserfs`: An in-browser file system that emulates the Node JS file system API and supports storing and retrieving files from various backends. Forked from [https://github.com/jvilk/BrowserFS](https://github.com/jvilk/BrowserFS), with an additional [CodeSandbox backend](https://github.com/codesandbox/codesandbox-client/blob/master/standalone-packages/codesandbox-browserfs/src/backend/CodeSandboxFS.ts).
24
-
25
-
This version of CodeSandbox is using the production server as source of truth, this is specified by the environment variable `LOCAL_SERVER`. If you're working on a feature that needs you to be logged in, you can login on [https://codesandbox.io/](https://codesandbox.io/) and copy the contents of the `jwt` local storage key over to your development environment on [http://localhost:3000/](http://localhost:3000/). **Be very careful with how you handle the token**, as anyone who knows it can login as you and have read/write access to all your CodeSandbox content!
26
-
27
-
**Working on your first Pull Request?** You can learn how from this _free_ series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)
25
+
-`codesandbox-api`: The npm package that's responsible for communication
26
+
between the sandbox and the editor.
27
+
-`codesandbox-browserfs`: An in-browser file system that emulates the Node JS
28
+
file system API and supports storing and retrieving files from various
29
+
backends. Forked from
30
+
[https://github.com/jvilk/BrowserFS](https://github.com/jvilk/BrowserFS), with
This version of CodeSandbox is using the production server as source of truth,
35
+
this is specified by the environment variable `LOCAL_SERVER`. If you're working
36
+
on a feature that needs you to be logged in, you can login on
37
+
[https://codesandbox.io/](https://codesandbox.io/) and copy the contents of the
38
+
`jwt` local storage key over to your development environment on
39
+
[http://localhost:3000/](http://localhost:3000/). **Be very careful with how you
40
+
handle the token**, as anyone who knows it can login as you and have read/write
41
+
access to all your CodeSandbox content!
42
+
43
+
**Working on your first Pull Request?** You can learn how from this _free_
44
+
series
45
+
[How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github)
28
46
29
47
## Setting Up the project locally
30
48
31
49
To install the project you need to have `yarn` and `node`
32
50
33
-
1.[Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your fork:
51
+
1.[Fork](https://help.github.com/articles/fork-a-repo/) the project, clone
52
+
your fork:
34
53
35
54
```sh
36
55
# Clone your fork
@@ -41,11 +60,18 @@ To install the project you need to have `yarn` and `node`
41
60
```
42
61
43
62
2. Your environment needs to be running Node v. 10
63
+
- `.nvmrc` config exists in the repo root, specifying a v.10.x.x version
64
+
- you can use [fnm](https://github.com/Schniz/fnm) (`fnm use`) to change
65
+
your current node version to the one specified in`.nvmrc`
44
66
3. from the root of the project: `yarn` to install all dependencies
45
67
4. from the root of the project: `yarn start`
46
-
- this builds the dependencies (`codesandbox-api` and `codesandbox-browserfs`) and runs the `app` development environment, available on [http://localhost:3000/s/new](http://localhost:3000/s/new)
47
-
- on subsequent runs you can also bypass dependencies building and use `yarn start:fast`
48
-
- if you want to work on the homepage, start it with `yarn start:home`, it will be available on [http://localhost:8000/](http://localhost:8000/)
68
+
- this builds the dependencies (`codesandbox-api` and
69
+
`codesandbox-browserfs`) and runs the `app` development environment,
70
+
available on [http://localhost:3000/s/new](http://localhost:3000/s/new)
71
+
- on subsequent runs you can also bypass dependencies building and use
72
+
`yarn start:fast`
73
+
- if you want to work on the homepage, start it with `yarn start:home`, it
74
+
will be available on [http://localhost:8000/](http://localhost:8000/)
49
75
50
76
> Tip: Keep your `master` branch pointing at the original repository and make
51
77
> pull requests from branches on your fork. To do this, run:
@@ -56,35 +82,44 @@ To install the project you need to have `yarn` and `node`
> This will add the original repository as a "remote" called "upstream,"
60
-
>then fetch the git information from that remote, thenset your local`master`
61
-
> branch to use the upstream master branch whenever you run `git pull`.
62
-
> Then you can make all of your pull request branches based on this `master`
63
-
> branch. Whenever you want to update your version of `master`, do a regular
64
-
>`git pull`.
65
-
66
-
5. If you want to debug the state of the app, install the [Cerebral Debugger](https://github.com/cerebral/cerebral-debugger/releases) and connect it to the port `8383`. After that, if you refresh the app, you should be able to see the state, the sequences executed and so on. See [documentation](https://cerebraljs.com/docs/introduction/devtools.html) for reference.
85
+
> This will add the original repository as a "remote" called "upstream,"then
86
+
> fetch the git information from that remote, thenset your local`master`
87
+
> branch to use the upstream master branch whenever you run `git pull`. Then you
88
+
> can make all of your pull request branches based on this `master` branch.
89
+
> Whenever you want to update your version of `master`, do a regular `git pull`.
90
+
91
+
5. If you want to debug the state of the app, install the
and connect it to the port `8383`. After that, if you refresh the app, you
94
+
should be able to see the state, the sequences executed and so on. See
95
+
[documentation](https://cerebraljs.com/docs/introduction/devtools.html) for
96
+
reference.
67
97
68
98
## Submitting a Pull Request
69
99
70
-
Please go through existing issues and pull requests to check if somebody else is already working on it, we use `someone working on it` label to mark such issues.
100
+
Please go through existing issues and pull requests to check if somebody else is
101
+
already working on it, we use `someone working on it` label to mark such issues.
71
102
72
-
Also, make sure to run the tests and lint the code before you commit your changes.
103
+
Also, make sure to run the tests and lint the code before you commit your
104
+
changes.
73
105
74
106
```sh
75
107
yarn test
76
108
yarn lint
77
109
```
78
110
79
-
Before running `yarn lint`, you must have build our `common` and `notifications` packages.
111
+
Before running `yarn lint`, you must have build our `common` and `notifications`
112
+
packages.
80
113
81
114
```sh
82
115
yarn build:deps
83
116
```
84
117
85
118
## Add yourself as a contributor
86
119
87
-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
0 commit comments