Skip to content

Commit facdefc

Browse files
tanemSaraVieira
andcommitted
Add a default TypeScript boilerplate for Current Module View (codesandbox#2713)
* Add a default ts boilerplate * Add @tanem as a contributor Co-authored-by: Sara Vieira <[email protected]>
1 parent 6dca8d6 commit facdefc

File tree

3 files changed

+31
-4
lines changed

3 files changed

+31
-4
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,6 +1403,15 @@
14031403
"code"
14041404
]
14051405
},
1406+
{
1407+
"login": "tanem",
1408+
"name": "Tane Morgan",
1409+
"avatar_url": "https://avatars3.githubusercontent.com/u/464864?v=4",
1410+
"profile": "https://github.com/tanem",
1411+
"contributions": [
1412+
"code"
1413+
]
1414+
},
14061415
{
14071416
"login": "hetpatel33",
14081417
"name": "Het Patel",

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,7 @@ Thanks goes to these wonderful people
229229
<td align="center"><a href="http://ThomasDillard.com"><img src="https://avatars1.githubusercontent.com/u/12449668?v=4" width="100px;" alt="Thomas Dillard"/><br /><sub><b>Thomas Dillard</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=HTMLGhozt" title="Code">💻</a></td>
230230
<td align="center"><a href="https://github.com/chinmay17"><img src="https://avatars2.githubusercontent.com/u/7131231?v=4" width="100px;" alt="Chinmay Chaudhary"/><br /><sub><b>Chinmay Chaudhary</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=chinmay17" title="Code">💻</a></td>
231231
<td align="center"><a href="https://github.com/Sakthivel"><img src="https://avatars3.githubusercontent.com/u/205201?v=4" width="100px;" alt="Sakthivel Sengodan Sapient"/><br /><sub><b>Sakthivel Sengodan Sapient</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=sakthivel" title="Code">💻</a></td>
232-
<td align="center"><a href="https://github.com/vanya829"><img src="https://avatars0.githubusercontent.com/u/1397979?v=4" width="100px;" alt="vanya829"/><br /><sub><b>vanya829</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=vanya829" title="Code">💻</a></td>
233-
<td align="center"><a href="https://github.com/NabeelahY"><img src="https://avatars1.githubusercontent.com/u/35764602?v=4" width="100px;" alt=""/><br /><sub><b>Nabeelah</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=NabeelahY" title="Code">💻</a></td>
234-
</tr>
232+
</tr>
235233
<tr>
236234
<td align="center"><a href="http://hetpatel33.github.io"><img src="https://avatars0.githubusercontent.com/u/13877514?v=4" width="100px;" alt="Het Patel"/><br /><sub><b>Het Patel</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=hetpatel33" title="Code">💻</a></td>
237235
<td align="center"><a href="https://twitter.com/ivandevp"><img src="https://avatars3.githubusercontent.com/u/9284690?v=4" width="100px;" alt="Ivan Medina"/><br /><sub><b>Ivan Medina</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=ivandevp" title="Code">💻</a></td>
@@ -240,9 +238,14 @@ Thanks goes to these wonderful people
240238
<td align="center"><a href="https://armujahid.me"><img src="https://avatars1.githubusercontent.com/u/3725386?v=4" width="100px;" alt="Abdul Rauf"/><br /><sub><b>Abdul Rauf</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=armujahid" title="Code">💻</a> <a href="https://github.com/codesandbox/codesandbox-client/commits?author=armujahid" title="Documentation">📖</a></td>
241239
<td align="center"><a href="https://github.com/milap1296"><img src="https://avatars2.githubusercontent.com/u/19545730?v=4" width="100px;" alt="milap1296"/><br /><sub><b>milap1296</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=milap1296" title="Code">💻</a></td>
242240
<td align="center"><a href="http://yevhenorlov.com"><img src="https://avatars2.githubusercontent.com/u/17388747?v=4" width="100px;" alt="yevhen orlov"/><br /><sub><b>yevhen orlov</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=yevhenorlov" title="Code">💻</a></td>
241+
</tr>
242+
<tr>
243+
<td align="center"><a href="https://github.com/vanya829"><img src="https://avatars0.githubusercontent.com/u/1397979?v=4" width="100px;" alt="vanya829"/><br /><sub><b>vanya829</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=vanya829" title="Code">💻</a></td>
244+
<td align="center"><a href="https://github.com/NabeelahY"><img src="https://avatars1.githubusercontent.com/u/35764602?v=4" width="100px;" alt=""/><br /><sub><b>Nabeelah</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=NabeelahY" title="Code">💻</a></td>
243245
<td align="center"><a href="https://github.com/NileshPatel17"><img src="https://avatars2.githubusercontent.com/u/27020381?v=4" width="100px;" alt="Nilesh Patel"/><br /><sub><b>Nilesh Patel</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=NileshPatel17" title="Code">💻</a></td>
244246
<td align="center"><a href="https://github.com/22PoojaGaur"><img src="https://avatars2.githubusercontent.com/u/43316760?v=4" width="100px;" alt="Pooja Gaur"/><br /><sub><b>Pooja Gaur</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=22PoojaGaur" title="Code">💻</a></td>
245247
<td align="center"><a href="https://github.com/sajadhsm"><img src="https://avatars3.githubusercontent.com/u/20022818?v=4" width="100px;" alt="Sajad Hashemian"/><br /><sub><b>Sajad Hashemian</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=sajadhsm" title="Code">💻</a></td>
248+
<td align="center"><a href="https://github.com/tanem"><img src="https://avatars3.githubusercontent.com/u/464864?v=4" width="100px;" alt="Tane Morgan"/><br /><sub><b>Tane Morgan</b></sub></a><br /><a href="https://github.com/codesandbox/codesandbox-client/commits?author=tanem" title="Code">💻</a></td>
246249
</tr>
247250
</table>
248251

packages/app/src/sandbox/boilerplates/default-boilerplates.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,19 @@ export default function(module) {
2424
`,
2525
};
2626

27-
export default [JS, HTML];
27+
export const TS = {
28+
id: 'ts',
29+
extension: '.ts',
30+
condition: '.tsx?$',
31+
code: `
32+
import * as React from 'react';
33+
import { render } from 'react-dom';
34+
export default function(module) {
35+
const node = document.createElement('div');
36+
document.body.appendChild(node);
37+
render(React.createElement(module.default), node);
38+
}
39+
`,
40+
};
41+
42+
export default [JS, HTML, TS];

0 commit comments

Comments
 (0)