Skip to content

Commit ba7493b

Browse files
VitGottwaldCompuIves
authored andcommitted
Add .nvmrc (codesandbox#2290)
* 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
1 parent 7f60785 commit ba7493b

File tree

5 files changed

+76
-26
lines changed

5 files changed

+76
-26
lines changed

β€Ž.all-contributorsrcβ€Ž

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,6 +1291,17 @@
12911291
"bug",
12921292
"code"
12931293
]
1294+
},
1295+
{
1296+
"login": "baremetalfreak",
1297+
"name": "baremetalfreak",
1298+
"avatar_url": "https://avatars0.githubusercontent.com/u/19686979?v=4",
1299+
"profile": "https://github.com/baremetalfreak",
1300+
"contributions": [
1301+
"question",
1302+
"bug",
1303+
"code"
1304+
]
12941305
}
12951306
],
12961307
"repoType": "github",

β€Ž.nvmrcβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v10.16.2

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 59 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,46 @@
1010

1111
## Code of Conduct
1212

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.
1416

1517
## Code Organization
1618

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.
1821

1922
- `app`: The editor, the search, profile page, the embed and the sandbox.
2023
- `homepage`: The Gatsby website of the homepage.
2124
- `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
31+
an additional
32+
[CodeSandbox backend](https://github.com/codesandbox/codesandbox-client/blob/master/standalone-packages/codesandbox-browserfs/src/backend/CodeSandboxFS.ts).
33+
34+
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)
2846

2947
## Setting Up the project locally
3048

3149
To install the project you need to have `yarn` and `node`
3250

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:
3453

3554
```sh
3655
# Clone your fork
@@ -41,11 +60,18 @@ To install the project you need to have `yarn` and `node`
4160
```
4261

4362
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`
4466
3. from the root of the project: `yarn` to install all dependencies
4567
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/)
4975

5076
> Tip: Keep your `master` branch pointing at the original repository and make
5177
> 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`
5682
> git branch --set-upstream-to=upstream/master master
5783
> ```
5884
>
59-
> This will add the original repository as a "remote" called "upstream,"
60-
> then fetch the git information from that remote, then set 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, then set 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
92+
[Cerebral Debugger](https://github.com/cerebral/cerebral-debugger/releases)
93+
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.
6797

6898
## Submitting a Pull Request
6999

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.
71102

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.
73105

74106
```sh
75107
yarn test
76108
yarn lint
77109
```
78110

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.
80113

81114
```sh
82115
yarn build:deps
83116
```
84117

85118
## Add yourself as a contributor
86119

87-
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
120+
This project follows the
121+
[all-contributors](https://github.com/all-contributors/all-contributors)
122+
specification. Contributions of any kind welcome!
88123

89124
To add yourself to the table of contributors on the `README.md`, please use the
90125
automated script as part of your PR:

β€ŽREADME.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [CodeSandbox](https://codesandbox.io) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/codesandbox) [![All Contributors](https://img.shields.io/badge/all_contributors-137-orange.svg?style=flat-square)](#contributors) [![CircleCI](https://circleci.com/gh/codesandbox/codesandbox-client.svg?style=svg)](https://circleci.com/gh/codesandbox/codesandbox-client) [![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf)](https://www.browserstack.com/automate/public-build/cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![first-timers-only Friendly](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](http://www.firsttimersonly.com/)
1+
# [CodeSandbox](https://codesandbox.io) [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/codesandbox) [![All Contributors](https://img.shields.io/badge/all_contributors-138-orange.svg?style=flat-square)](#contributors) [![CircleCI](https://circleci.com/gh/codesandbox/codesandbox-client.svg?style=svg)](https://circleci.com/gh/codesandbox/codesandbox-client) [![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf)](https://www.browserstack.com/automate/public-build/cVJuczlJWUtqWXhIbFN1ZjVQekF4NzNsd3phNEZRaGlWU0pHYVVkdGRFWT0tLXFtTVhaOWRySmN0ZG5QVDNDQ0g5Z0E9PQ==--79fe3eae4f149a400d396c9b12d3988f685785cf) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![first-timers-only Friendly](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](http://www.firsttimersonly.com/)
22

33
[![Backers on Open Collective](https://opencollective.com/codesandbox/backers/badge.svg)](#backers)
44
[![Sponsors on Open Collective](https://opencollective.com/codesandbox/sponsors/badge.svg)](#sponsors)
@@ -62,7 +62,7 @@ Thanks goes to these wonderful people
6262
| [<img src="https://avatars3.githubusercontent.com/u/15030806?v=4" width="100px;"/><br /><sub><b>Bruce Xu</b></sub>](http://www.xulingming.cn)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=jackdon "Code") | [<img src="https://avatars3.githubusercontent.com/u/7316730?v=4" width="100px;"/><br /><sub><b>jess</b></sub>](http://jessachandler.com)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=monkeywithacupcake "Code") | [<img src="https://avatars0.githubusercontent.com/u/8875406?v=4" width="100px;"/><br /><sub><b>Juliette PrΓ©tot</b></sub>](https://juliette.sh)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=juliettepretot "Code") | [<img src="https://avatars0.githubusercontent.com/u/25737281?v=4" width="100px;"/><br /><sub><b>Victoria Bergquist</b></sub>](https://twitter.com/vicbergquist)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=vicbergquist "Code") [πŸ“–](https://github.com/codesandbox/codesandbox-client/commits?author=vicbergquist "Documentation") | [<img src="https://avatars3.githubusercontent.com/u/9032162?v=4" width="100px;"/><br /><sub><b>Samrith Shankar</b></sub>](https://github.com/samrith-s)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=samrith-s "Code") | [<img src="https://avatars3.githubusercontent.com/u/827497?v=4" width="100px;"/><br /><sub><b>Mahendra Hirapra</b></sub>](https://github.com/tinahir)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=tinahir "Code") | [<img src="https://avatars3.githubusercontent.com/u/17409675?v=4" width="100px;"/><br /><sub><b>Rabin Gaire</b></sub>](http://rabingaire.com.np)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=rabingaire "Code") |
6363
| [<img src="https://avatars2.githubusercontent.com/u/8527474?v=4" width="100px;"/><br /><sub><b>Neville Mehta</b></sub>](https://twitter.com/ask_neville)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=nm123github "Code") | [<img src="https://avatars0.githubusercontent.com/u/1813468?v=4" width="100px;"/><br /><sub><b>Vasiliy</b></sub>](https://github.com/Yeti-or)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=Yeti-or "Code") | [<img src="https://avatars3.githubusercontent.com/u/2793951?v=4" width="100px;"/><br /><sub><b>Romain Lanz</b></sub>](https://slynova.io)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=RomainLanz "Code") | [<img src="https://avatars2.githubusercontent.com/u/1233790?v=4" width="100px;"/><br /><sub><b>LiBe</b></sub>](http://libe.toile-libre.org)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=libetl "Code") | [<img src="https://avatars0.githubusercontent.com/u/5333019?v=4" width="100px;"/><br /><sub><b>Jeremy Bolding</b></sub>](http://thecodechef.github.io)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=thecodechef "Code") | [<img src="https://avatars1.githubusercontent.com/u/9664363?v=4" width="100px;"/><br /><sub><b>Evan Bacon</b></sub>](https://twitter.com/baconbrix)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=EvanBacon "Code") | [<img src="https://avatars3.githubusercontent.com/u/6643991?v=4" width="100px;"/><br /><sub><b>MichaΓ«l De Boey</b></sub>](https://michaeldeboey.be)<br />[πŸ“](#blog-MichaelDeBoey "Blogposts") [πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3AMichaelDeBoey "Bug reports") [πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=MichaelDeBoey "Code") [πŸ“–](https://github.com/codesandbox/codesandbox-client/commits?author=MichaelDeBoey "Documentation") [πŸš‡](#infra-MichaelDeBoey "Infrastructure (Hosting, Build-Tools, etc)") [πŸ”§](#tool-MichaelDeBoey "Tools") |
6464
| [<img src="https://avatars1.githubusercontent.com/u/14077091?v=4" width="100px;"/><br /><sub><b>gabeeden</b></sub>](https://github.com/gabeeden)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=gabeeden "Code") | [<img src="https://avatars0.githubusercontent.com/u/7698292?v=4" width="100px;"/><br /><sub><b>Tiffany White</b></sub>](https://tiffanywhite.dev)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=twhite96 "Code") | [<img src="https://avatars3.githubusercontent.com/u/32302360?v=4" width="100px;"/><br /><sub><b>James Bedford</b></sub>](http://www.dopest.tech)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=JABedford "Code") | [<img src="https://avatars0.githubusercontent.com/u/3314957?v=4" width="100px;"/><br /><sub><b>Scott</b></sub>](https://www.patreon.com/user?u=16255660)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=smolinari "Code") | [<img src="https://avatars1.githubusercontent.com/u/12200583?v=4" width="100px;"/><br /><sub><b>Dutiyesh Salunkhe</b></sub>](https://github.com/dutiyesh)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=dutiyesh "Code") | [<img src="https://avatars2.githubusercontent.com/u/13641726?v=4" width="100px;"/><br /><sub><b>Halit Ogunc</b></sub>](http://halit.dev)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=halitogunc "Code") | [<img src="https://avatars0.githubusercontent.com/u/22376783?v=4" width="100px;"/><br /><sub><b>Yash Joshi</b></sub>](https://github.com/jyash97)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=jyash97 "Code") |
65-
| [<img src="https://avatars3.githubusercontent.com/u/1769092?v=4" width="100px;"/><br /><sub><b>Yehor</b></sub>](https://github.com/batiskafff)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=batiskafff "Code") | [<img src="https://avatars2.githubusercontent.com/u/6972822?v=4" width="100px;"/><br /><sub><b>Jens de Rond</b></sub>](https://github.com/Jensderond)<br />[πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3AJensderond "Bug reports") [πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=Jensderond "Code") | [<img src="https://avatars2.githubusercontent.com/u/2502947?v=4" width="100px;"/><br /><sub><b>Benjamin Schachter</b></sub>](http://benjaminschachter.com)<br />[πŸ“–](https://github.com/codesandbox/codesandbox-client/commits?author=benschac "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/14234815?v=4" width="100px;"/><br /><sub><b>Rafael</b></sub>](https://github.com/RafaelKr)<br />[πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3ARafaelKr "Bug reports") [πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=RafaelKr "Code") |
65+
| [<img src="https://avatars3.githubusercontent.com/u/1769092?v=4" width="100px;"/><br /><sub><b>Yehor</b></sub>](https://github.com/batiskafff)<br />[πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=batiskafff "Code") | [<img src="https://avatars2.githubusercontent.com/u/6972822?v=4" width="100px;"/><br /><sub><b>Jens de Rond</b></sub>](https://github.com/Jensderond)<br />[πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3AJensderond "Bug reports") [πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=Jensderond "Code") | [<img src="https://avatars2.githubusercontent.com/u/2502947?v=4" width="100px;"/><br /><sub><b>Benjamin Schachter</b></sub>](http://benjaminschachter.com)<br />[πŸ“–](https://github.com/codesandbox/codesandbox-client/commits?author=benschac "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/14234815?v=4" width="100px;"/><br /><sub><b>Rafael</b></sub>](https://github.com/RafaelKr)<br />[πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3ARafaelKr "Bug reports") [πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=RafaelKr "Code") | [<img src="https://avatars0.githubusercontent.com/u/19686979?v=4" width="100px;"/><br /><sub><b>baremetalfreak</b></sub>](https://github.com/baremetalfreak)<br />[πŸ’¬](#question-baremetalfreak "Answering Questions") [πŸ›](https://github.com/codesandbox/codesandbox-client/issues?q=author%3Abaremetalfreak "Bug reports") [πŸ’»](https://github.com/codesandbox/codesandbox-client/commits?author=baremetalfreak "Code") |
6666

6767
<!-- ALL-CONTRIBUTORS-LIST:END -->
6868

β€Žpackage.jsonβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,8 @@
9393
"type": "opencollective",
9494
"url": "https://opencollective.com/codesandbox",
9595
"logo": "https://opencollective.com/codesandbox/logo.txt"
96+
},
97+
"engines": {
98+
"node": "^10.0.0"
9699
}
97100
}

0 commit comments

Comments
Β (0)