Skip to content

Commit 247779e

Browse files
mike-northCompuIves
authored andcommitted
[docs] importing - template can be specified in sandbox.config.json (codesandbox#1125)
1 parent bcbb983 commit 247779e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

packages/homepage/content/docs/2-importing.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ We infer sandbox settings based on several files in a repository.
3333
| Template - React-Typescript | If `package.json` dependencies contains `react-scripts-ts`. |
3434
| Template - Svelte | If `package.json` dependencies contains `svelte`. |
3535

36+
Additionally, you may specify a `template` property in your `./sandbox.config.json` file.
37+
38+
```json
39+
{
40+
"template": "node"
41+
}
42+
```
43+
3644
### Source
3745

3846
You can find the source of our git extractor [here](https://github.com/codesandbox-app/git-extractor).

packages/homepage/content/docs/3-configuration.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ A sandbox can be configured too, you can do this with `sandbox.config.json`. We
2525
| `infiniteLoopProtection` | Whether we should throw an error if we detect an infinite loop | `true`/`false` | `true` |
2626
| `hardReloadOnChange` | Whether we should refresh the sandbox page on every change, good for sandboxes with global state. | `true`/`false` | `false` |
2727
| `view` | Which view to show by default as the preview when opening the sandbox. | `browser`/`console`/`tests` | `browser` |
28+
| `template` | Which sandbox template to use | [see here](https://github.com/codesandbox-app/codesandbox-importers/blob/master/packages/types/index.d.ts#L24-L39) | smart detection, w/ fallback to `create-react-app` |

0 commit comments

Comments
 (0)