Skip to content

Commit

Permalink
[docs] importing - template can be specified in sandbox.config.json (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-north authored and CompuIves committed Oct 1, 2018
1 parent bcbb983 commit 247779e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/homepage/content/docs/2-importing.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ We infer sandbox settings based on several files in a repository.
| Template - React-Typescript | If `package.json` dependencies contains `react-scripts-ts`. |
| Template - Svelte | If `package.json` dependencies contains `svelte`. |

Additionally, you may specify a `template` property in your `./sandbox.config.json` file.

```json
{
"template": "node"
}
```

### Source

You can find the source of our git extractor [here](https://github.com/codesandbox-app/git-extractor).
Expand Down
1 change: 1 addition & 0 deletions packages/homepage/content/docs/3-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ A sandbox can be configured too, you can do this with `sandbox.config.json`. We
| `infiniteLoopProtection` | Whether we should throw an error if we detect an infinite loop | `true`/`false` | `true` |
| `hardReloadOnChange` | Whether we should refresh the sandbox page on every change, good for sandboxes with global state. | `true`/`false` | `false` |
| `view` | Which view to show by default as the preview when opening the sandbox. | `browser`/`console`/`tests` | `browser` |
| `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 comments on commit 247779e

Please sign in to comment.