Skip to content

Commit 0139141

Browse files
Merge pull request #1458 from zhongsp/zhongsp/zh-doc-nightly-builds
i18n: add zh translation of "Nightly Builds"
2 parents c2b80e6 + eac9567 commit 0139141

File tree

1 file changed

+80
-0
lines changed

1 file changed

+80
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: 每日构建
3+
layout: docs
4+
permalink: /zh/docs/handbook/nightly-builds.html
5+
oneline: 如何使用TypeScript的每日构建版本
6+
translatable: true
7+
---
8+
9+
在太平洋标准时间的每日午夜,TypeScript 代码仓库中[master 分支](https://github.com/Microsoft/TypeScript/tree/master)上的代码会自动构建并发布到 npm 上。
10+
下面将介绍如何获取并结合你的工具来使用它。
11+
12+
## 使用 npm
13+
14+
```shell
15+
npm install -g typescript@next
16+
```
17+
18+
## 更新 IDE 来使用每日构建
19+
20+
你还可以配置 IDE 来使用每日构建。
21+
首先你需要通过 npm 来安装代码包。
22+
你可以进行全局安装或者安装到本地的`node_modules`目录下。
23+
24+
在下面的内容中,我们假设你已经安装好了`typescript@next`
25+
26+
### Visual Studio Code
27+
28+
参考以下示例来更新`.vscode/settings.json`
29+
30+
```json
31+
"typescript.tsdk": "<path to your folder>/node_modules/typescript/lib"
32+
```
33+
34+
更多详情请参考 [VSCode 文档](https://code.visualstudio.com/Docs/languages/typescript#_using-newer-typescript-versions)
35+
36+
### Sublime Text
37+
38+
参考以下示例来更新`Settings - User`
39+
40+
```json
41+
"typescript_tsdk": "<path to your folder>/node_modules/typescript/lib"
42+
```
43+
44+
更多详情请参考 [如何在 Sublime Text 里安装 TypeScript 插件](https://github.com/Microsoft/TypeScript-Sublime-Plugin#installation)
45+
46+
### Visual Studio 2013 和 2015
47+
48+
> 注意:绝大多数的变更不需要你安装新版本的 VS TypeScript 插件。
49+
50+
目前,每日构建中没有包含完整的插件安装包,但是我们正在试着提供这样的安装包。
51+
52+
1. 下载 [VSDevMode.ps1](https://github.com/Microsoft/TypeScript/blob/master/scripts/VSDevMode.ps1) 脚本。
53+
54+
> 同时也可以参考 wiki 文档: [使用自定义的语言服务文件](https://github.com/Microsoft/TypeScript/wiki/Dev-Mode-in-Visual-Studio#using-a-custom-language-service-file)
55+
56+
2. 打开 PowerShell 命令行窗口,并运行:
57+
58+
针对 VS 2015:
59+
60+
```posh
61+
VSDevMode.ps1 14 -tsScript <path to your folder>/node_modules/typescript/lib
62+
```
63+
64+
针对 VS 2013:
65+
66+
```posh
67+
VSDevMode.ps1 12 -tsScript <path to your folder>/node_modules/typescript/lib
68+
```
69+
70+
### IntelliJ IDEA (Mac)
71+
72+
前往 `Preferences` > `Languages & Frameworks` > `TypeScript`
73+
74+
> TypeScript Version:若通过 npm 安装则为:`/usr/local/lib/node_modules/typescript/lib`
75+
76+
### IntelliJ IDEA (Windows)
77+
78+
前往 `File` > `Settings` > `Languages & Frameworks` > `TypeScript`
79+
80+
> TypeScript Version:若通过 npm 安装则为:`C:\Users\USERNAME\AppData\Roaming\npm\node_modules\typescript\lib`

0 commit comments

Comments
 (0)