Skip to content

Commit 524bc56

Browse files
Updated readme
1 parent 24a71a4 commit 524bc56

File tree

3 files changed

+57
-78
lines changed

3 files changed

+57
-78
lines changed

README.md

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ Many teams may find themselves in this position after dealing with TypeScript is
88

99
Particularly on the backend, the dynamic type system of JS (and therefore, TS) can be a bane when it comes to ensuring data quality and system correctness.
1010

11-
JavaScript's single-threaded nature also means that it can feel limiting for both runtime throughput and the possible tools developers can use to solve performance sensitive problems (e.g. processing a large CSV in parallel in a compute intensive scenario).
12-
1311
I hope that these docs can help convince you that C# is a very realistic pathway if your team is already comfortable with TypeScript and frameworks like Nest.js.
1412

1513
Check out the published docs ***and please leave feedback***!
@@ -23,14 +21,60 @@ Fork and make a PR! Most of this repo is simply markdown so it's easy to contri
2321
To run locally:
2422

2523
```shell
24+
# Install dependencies
25+
cd docs
26+
yarn
27+
2628
# From the root
2729
yarn --cwd docs docs:dev
2830
```
2931

32+
## Code Examples
33+
34+
To test your code examples:
35+
36+
### TypeScript
37+
38+
1. Use [TypeScript Playground](https://www.typescriptlang.org/play/?#)
39+
2. For more comprehensive examples, create a sample project in `src/typescript`
40+
3. Use the `src/typescript/js-notebook.dib` for simple JavaScript examples
41+
42+
### C#
43+
44+
1. Use the C# notebook in `src/csharp/csharp-notebook.dib`
45+
2. Create a single file app in `src/csharp/fileapps`
46+
3. Create a full project and add it to the top-level solution.
47+
48+
## Authoring Tips
49+
50+
The code splitter is a custom Vue component.
51+
52+
To use the code splitter:
53+
54+
````html
55+
<CodeSplitter>
56+
<template #left>
57+
58+
```ts
59+
// TS/JS code goes here
60+
```
61+
62+
</template>
63+
<template #right>
64+
65+
```cs
66+
// C# code goes here
67+
```
68+
69+
</template>
70+
</CodeSplitter>
71+
````
72+
73+
> 💡 ***Note*** the extra space after the opening `<template>` and before the closing `</template>`. This is necessary for the VitePress pre-processor.
74+
3075
## Guidelines
3176

32-
- No trashing either language; we're focused on educating
77+
- Focus on educating; you don't have to be able to fill in both sides (C# and JS); you can fill in one side and leave the other "WIP"
3378
- Write clear, concise, and easy to follow examples
3479
- Try to distill the examples down to the simplest use case that demonstrates the idea
35-
- Write both TS and C# except for cases where it's focused on a C# specific language feature
3680
- Use [VitePress markdown extensions](https://vitepress.dev/guide/markdown) where appropriate including code line highlighting

typescript-is-like-csharp.sln

Lines changed: 0 additions & 74 deletions
This file was deleted.

typescript-is-like-csharp.slnx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Solution>
2+
<Project Path="src/csharp/console/console.csproj" />
3+
<Project Path="src/csharp/csharpier-example/csharpier-example.csproj" />
4+
<Project Path="src/csharp/editorconfig-example/editorconfig-example.csproj" />
5+
<Project Path="src/csharp/ef-api/ef-api.csproj" />
6+
<Project Path="src/csharp/tunit-example/tunit-example.csproj" />
7+
<Project Path="src/csharp/webapi-controllers/webapi-controllers.csproj" />
8+
<Project Path="src/csharp/webapi-minimal/webapi-minimal.csproj" />
9+
</Solution>

0 commit comments

Comments
 (0)