forked from codesandbox/codesandbox-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreact-template.ts
More file actions
30 lines (25 loc) · 757 Bytes
/
react-template.ts
File metadata and controls
30 lines (25 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import Template, { ViewConfig, ParsedConfigurationFiles } from '../template';
export class ReactTemplate extends Template {
getViews(): ViewConfig[] {
const REACT_VIEWS: ViewConfig[] = [
{
views: [{ id: 'codesandbox.browser' }, { id: 'codesandbox.tests' }],
},
{
views: [
{ id: 'codesandbox.console' },
{ id: 'codesandbox.problems' },
{ id: 'codesandbox.react-devtools' },
],
},
];
return REACT_VIEWS;
}
getDefaultOpenedFiles(configurationFiles: ParsedConfigurationFiles) {
let entries = [];
entries.push('/src/App.js');
entries.push('/src/App.tsx');
entries = entries.concat(this.getEntries(configurationFiles));
return entries;
}
}