Skip to content

Commit cffbc40

Browse files
k3achrisvfritz
authored andcommitted
TypeScript project generation in @vue/cli 3.0 (#1668)
* TypeScript project generation in @vue/cli 3.0 update information about generating TypeScript project using new @vue/cli 3.0 * tweaks to Vue CLI 3 TypeScript support docs
1 parent b0d792b commit cffbc40

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

src/v2/guide/typescript.md

+15-5
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ A static type system can help prevent many potential runtime errors, especially
1212

1313
Since these are [published on NPM](https://cdn.jsdelivr.net/npm/vue/types/), and the latest TypeScript knows how to resolve type declarations in NPM packages, this means when installed via NPM, you don't need any additional tooling to use TypeScript with Vue.
1414

15-
We also plan to provide an option to scaffold a ready-to-go Vue + TypeScript project in `vue-cli` in the near future.
16-
1715
## Recommended Configuration
1816

1917
``` js
@@ -37,11 +35,23 @@ See [TypeScript compiler options docs](https://www.typescriptlang.org/docs/handb
3735

3836
## Development Tooling
3937

40-
For developing Vue applications with TypeScript, we strongly recommend using [Visual Studio Code](https://code.visualstudio.com/), which provides great out-of-the-box support for TypeScript.
38+
## Project Creation
39+
40+
[Vue CLI 3](https://github.com/vuejs/vue-cli) can generate new projects that use TypeScript. To get started:
41+
42+
```bash
43+
# 1. Install Vue CLI, if it's not already installed
44+
npm install --global @vue/cli
45+
46+
# 2. Create a new project, then choose the "Manually select features" option
47+
vue create my-project-name
48+
```
49+
50+
## Editor Support
4151

42-
If you are using [single-file components](./single-file-components.html) (SFCs), get the awesome [Vetur extension](https://github.com/vuejs/vetur), which provides TypeScript inference inside SFCs and many other great features.
52+
For developing Vue applications with TypeScript, we strongly recommend using [Visual Studio Code](https://code.visualstudio.com/), which provides great out-of-the-box support for TypeScript. If you are using [single-file components](./single-file-components.html) (SFCs), get the awesome [Vetur extension](https://github.com/vuejs/vetur), which provides TypeScript inference inside SFCs and many other great features.
4353

44-
[WebStorm](https://www.jetbrains.com/webstorm/) also provides out-of-the-box support for both TypeScript and Vue.js.
54+
[WebStorm](https://www.jetbrains.com/webstorm/) also provides out-of-the-box support for both TypeScript and Vue.
4555

4656
## Basic Usage
4757

0 commit comments

Comments
 (0)