-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial stab at a TypeScript blog post #5101
Conversation
Co-authored-by: pngwn <hello@pngwn.io>
Draft-y because I'd like @halfnelson @kaisermann @dummdidumm and @jasonlyu123 to take a look over |
Looks good to me, tone feels good. Might be nice to get some more eyes on. @Conduitry @antony @Rich-Harris Do you think this should coincide with a broader announcement on twitter? |
I err, also didn't test that |
Can't remember if that is a default with Prismjs, if not we'll need to add it in |
Of course it doesn't. |
I can do it another way, it's just a good visual shortcut 👍 no need to do werk |
Opened a PR to get this in, it will need merging and publishing before it works. We may also need to add: import 'prismjs/components/prism-diff'; To I think this is valuable anyway, don't worry about the extra work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👌 it's finally here 😭
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only nitpicks really. I love the tone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it! Some nit-picks, but that's all.
Co-authored-by: halfnelson <dpershouse@gmail.com> Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
@kierangilliam |
Thanks folks, updated from feedback! |
3 out of 4 PRs necessary for Sapper TypeScript support have been merged and released. If the last one is able to be given a final review, perhaps we could announce Sapper TypeScript support as well. |
Really nice post. Perhaps you could add something like a tldr; paragraph for the anxious people, right before |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wonderful! I made a few inline suggestions. We might also want to rename this file so that the date is more reflective of when it goes live 😀
The post ends quite abruptly — I wonder if we should tack on a couple of pars?
## What about TypeScript in Sapper projects?
Watch this space!
## How can I contribute?
We're so glad you asked. The work is happening in the [sveltejs/language-tools](https://github.com/sveltejs/language-tools) — if you'd like to report issues, submit fixes, or help out with extensions for new editors and so on, that's where to go. See you there!
<img alt="Screenshot of TypeScript in Svelte" src="media/svelte-ts.png"> | ||
<figcaption>Image of TypeScript + Svelte in VS Code (theme is <a href="https://marketplace.visualstudio.com/items?itemName=karyfoundation.theme-karyfoundation-themes">Kary Pro</a>.)</figcaption> | ||
</figure> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a lot of people will want to just try it out straight away, so here (above the fold) would be a good place to have the quickstart guide
## Try it now | |
You can start a new Svelte TypeScript project using the [normal template](https://github.com/sveltejs/template) by running `node scripts/setupTypeScript.js` before you do anything else: | |
npx degit sveltejs/template svelte-typescript-app | |
cd svelte-typescript-app | |
node scripts/setupTypeScript.js | |
If you're a VS Code user, make sure you're using the (new) [official extension](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode), which replaces the popular extension by James Birtles. | |
Later in this blog post, we'll detail the individual steps involved in using TypeScript in an existing Svelte project. | |
(side-note: how do you put code blocks inside a commit suggestion...?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possibly by giving the suggestion
language 4 backticks instead of 3. But don't quote me on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This week I learned how:
GFMarkdown allows for the code fences to be an arbitrary size. Here I'm using four on the outer one:
```ts
```
The post is great! I think it would be great to reference the script once more at the start of the file changes explanation. |
* Initial stab at a blog post * Update site/content/blog/2020-06-04-svelte-and-typescript.md Co-authored-by: pngwn <hello@pngwn.io> * Update 2020-06-04-svelte-and-typescript.md * Apply suggestions from code review Co-authored-by: halfnelson <dpershouse@gmail.com> Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com> * Tighten the post * Fix degit sample * Feedback * More feeedback * Handle feedback * Handle all the feedback in the PR * Add a note about the should work * Change date * code style consistency, fix syntax error Co-authored-by: pngwn <hello@pngwn.io> Co-authored-by: halfnelson <dpershouse@gmail.com> Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com> Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
* Initial stab at a blog post * Update site/content/blog/2020-06-04-svelte-and-typescript.md Co-authored-by: pngwn <hello@pngwn.io> * Update 2020-06-04-svelte-and-typescript.md * Apply suggestions from code review Co-authored-by: halfnelson <dpershouse@gmail.com> Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com> * Tighten the post * Fix degit sample * Feedback * More feeedback * Handle feedback * Handle all the feedback in the PR * Add a note about the should work * Change date * code style consistency, fix syntax error Co-authored-by: pngwn <hello@pngwn.io> Co-authored-by: halfnelson <dpershouse@gmail.com> Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com> Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
Adds a post covering and giving credit to all the folks involved in the editor support.