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: CONTRIBUTING.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@
10
10
11
11
## Code of Conduct
12
12
13
-
We have a code of conduct you can find [here](https://github.com/CompuIves/codesandbox-client/blob/master/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](https://github.com/codesandbox/codesandbox-client/blob/master/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.
14
14
15
15
## Code Organization
16
16
@@ -20,7 +20,7 @@ The CodeSandbox client is currently divided in to 5 parts. We use `lerna` to sha
20
20
-`homepage`: The Gatsby website of the homepage.
21
21
-`common`: All common parts between these packages, reusable JS.
22
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/CompuIves/codesandbox-client/blob/master/standalone-packages/codesandbox-browserfs/src/backend/CodeSandboxFS.ts).
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
24
25
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
26
@@ -50,7 +50,7 @@ To install the project you need to have `yarn` and `node`
50
50
> pull requests from branches on your fork. To do this, run:
Copy file name to clipboardExpand all lines: contributor-docs/adding-template.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ To contribute with a CodeSandbox template, you need to complete multiple steps a
4
4
5
5
We realise that the process of submitting a template is not straightforward and we hope that this guide will help you along the way. We are working on a system that will make it easier.
6
6
7
-
If you think that we missed something in this guide or believe we could explain something better, please let us know by submitting an [issue](https://github.com/CompuIves/codesandbox-client/issues/new/choose) with your feedback.
7
+
If you think that we missed something in this guide or believe we could explain something better, please let us know by submitting an [issue](https://github.com/codesandbox/codesandbox-client/issues/new/choose) with your feedback.
8
8
9
9
## What is a template?
10
10
@@ -42,20 +42,20 @@ We encourage everyone to first evaluate whether the template works as a sandbox,
42
42
43
43
In order to add a new template, you need to go through a set of steps. Some of these steps you have to do, others depend on the type of template you want to add (**sandbox** vs. **container**).
44
44
45
-
To get started, you should first follow the steps in our contribution guidelines in order to [set up CodeSandbox locally](https://github.com/CompuIves/codesandbox-client/blob/master/CONTRIBUTING.md#setting-up-the-project-locally).
45
+
To get started, you should first follow the steps in our contribution guidelines in order to [set up CodeSandbox locally](https://github.com/codesandbox/codesandbox-client/blob/master/CONTRIBUTING.md#setting-up-the-project-locally).
46
46
47
47
### 1. Add template logo
48
48
49
-
Add the logo for your template in the [logos directory](https://github.com/CompuIves/codesandbox-client/tree/master/packages/common/src/components/logos) (`codesandbox-client/packages/common/src/components/logos`). How you do this depends on the file format of your logo.
49
+
Add the logo for your template in the [logos directory](https://github.com/codesandbox/codesandbox-client/tree/master/packages/common/src/components/logos) (`codesandbox-client/packages/common/src/components/logos`). How you do this depends on the file format of your logo.
50
50
51
51
#### SVG logos
52
52
53
53
Create a `.tsx` file in the `/logos` directory with the appropirate name and content. If your template's name is "Banana", name your logo file "Banana".
In order for CodeSandbox to recognise your template, you need to add a new definition of it in the `codesandbox-client/packages/common/src/templates`[directory](https://github.com/CompuIves/codesandbox-client/tree/master/packages/common/src/templates). You do this by creating a new `.ts` file with the name of your template.
81
+
In order for CodeSandbox to recognise your template, you need to add a new definition of it in the `codesandbox-client/packages/common/src/templates`[directory](https://github.com/codesandbox/codesandbox-client/tree/master/packages/common/src/templates). You do this by creating a new `.ts` file with the name of your template.
The template definition can have various options, which you can find more information about in [template.ts](https://github.com/CompuIves/codesandbox-client/blob/master/packages/common/src/templates/template.ts).
88
+
The template definition can have various options, which you can find more information about in [template.ts](https://github.com/codesandbox/codesandbox-client/blob/master/packages/common/src/templates/template.ts).
89
89
90
90
We encourage you to improve the user experience of your templates by taking advantage of the options you have available while writing your template definition.
91
91
@@ -96,23 +96,23 @@ Examples:
96
96
97
97
<!-- TODO: Add more examples -->
98
98
99
-
After writing your template definition, you also need to add it to the [index.js](https://github.com/CompuIves/codesandbox-client/blob/master/packages/common/src/templates/index.ts) file in the same directory (`codesandbox-client/packages/common/src/templates`) in order for CodeSandbox to be able to retrieve your template.
99
+
After writing your template definition, you also need to add it to the [index.js](https://github.com/codesandbox/codesandbox-client/blob/master/packages/common/src/templates/index.ts) file in the same directory (`codesandbox-client/packages/common/src/templates`) in order for CodeSandbox to be able to retrieve your template.
100
100
101
101
### 3. Define transpilers for sandbox
102
102
103
103
*If you are adding a template for a **container** sandbox, you can skip this step and proceed to step 4.*
104
104
105
105
For the sandboxes that run in the browser we need to define what transpilers need to be run. A template will not work in the bundler if it does not have a preset.
106
106
107
-
We call a template configuration for the bundler in CodeSandbox a 'Preset'. All currently installed presets are defined in the [index.ts](https://github.com/CompuIves/codesandbox-client/blob/master/packages/app/src/sandbox/eval/index.js) file under `codesandbox-client/packages/app/src/sandbox/eval/presets`.
107
+
We call a template configuration for the bundler in CodeSandbox a 'Preset'. All currently installed presets are defined in the [index.ts](https://github.com/codesandbox/codesandbox-client/blob/master/packages/app/src/sandbox/eval/index.js) file under `codesandbox-client/packages/app/src/sandbox/eval/presets`.
108
108
109
109
In order to understand how this configuration works, we recommend you to take a look at templates that have already been implemented and their presets.
@@ -122,7 +122,7 @@ This means you that you also have to add your template in another file in the `c
122
122
123
123
When you create your Pull Request in `codesanbox-client`, you also need to create a Pull Request in `codesandbox-importer` and reference it in your Pull Request for `codesandbox-client`. Example:
124
124
125
-
-[Add VuePress](https://github.com/CompuIves/codesandbox-client/pull/1652) in [codesandbox-client](https://github.com/CompuIves/codesandbox-client)
125
+
-[Add VuePress](https://github.com/codesandbox/codesandbox-client/pull/1652) in [codesandbox-client](https://github.com/codesandbox/codesandbox-client)
126
126
-[Add VuePress support](https://github.com/codesandbox/codesandbox-importers/pull/30) in [codesandbox-importer](https://github.com/codesandbox/codesandbox-importers)
127
127
128
128
### 5. Test the template
@@ -131,7 +131,7 @@ You can test your new sandbox template, however you cannot preview the functiona
131
131
132
132
#### Sandbox template
133
133
134
-
To test your new template, you need to create a mock response from the API and force the new template specification. To do this, you uncomment [this line](https://github.com/CompuIves/codesandbox-client/blob/master/packages/app/src/app/store/actions.js#L17) and change `'custom'` to the id/name of your template:
134
+
To test your new template, you need to create a mock response from the API and force the new template specification. To do this, you uncomment [this line](https://github.com/codesandbox/codesandbox-client/blob/master/packages/app/src/app/store/actions.js#L17) and change `'custom'` to the id/name of your template:
0 commit comments