Skip to content
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

i18n: add zh translation of "Nightly Builds" #1458

Merged
merged 1 commit into from
Jan 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions packages/documentation/copy/zh/Nightly Builds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: 每日构建
layout: docs
permalink: /zh/docs/handbook/nightly-builds.html
oneline: 如何使用TypeScript的每日构建版本
translatable: true
---

在太平洋标准时间的每日午夜,TypeScript 代码仓库中[master 分支](https://github.com/Microsoft/TypeScript/tree/master)上的代码会自动构建并发布到 npm 上。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: It's better to add UTC+8 time

(16:00 UTC+8)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay never mind

下面将介绍如何获取并结合你的工具来使用它。

## 使用 npm

```shell
npm install -g typescript@next
```

## 更新 IDE 来使用每日构建

你还可以配置 IDE 来使用每日构建。
首先你需要通过 npm 来安装代码包。
你可以进行全局安装或者安装到本地的`node_modules`目录下。

在下面的内容中,我们假设你已经安装好了`typescript@next`。

### Visual Studio Code

参考以下示例来更新`.vscode/settings.json`:

```json
"typescript.tsdk": "<path to your folder>/node_modules/typescript/lib"
```

更多详情请参考 [VSCode 文档](https://code.visualstudio.com/Docs/languages/typescript#_using-newer-typescript-versions)。

### Sublime Text

参考以下示例来更新`Settings - User`:

```json
"typescript_tsdk": "<path to your folder>/node_modules/typescript/lib"
```

更多详情请参考 [如何在 Sublime Text 里安装 TypeScript 插件](https://github.com/Microsoft/TypeScript-Sublime-Plugin#installation)。

### Visual Studio 2013 和 2015

> 注意:绝大多数的变更不需要你安装新版本的 VS TypeScript 插件。

目前,每日构建中没有包含完整的插件安装包,但是我们正在试着提供这样的安装包。

1. 下载 [VSDevMode.ps1](https://github.com/Microsoft/TypeScript/blob/master/scripts/VSDevMode.ps1) 脚本。

> 同时也可以参考 wiki 文档: [使用自定义的语言服务文件](https://github.com/Microsoft/TypeScript/wiki/Dev-Mode-in-Visual-Studio#using-a-custom-language-service-file)。

2. 打开 PowerShell 命令行窗口,并运行:

针对 VS 2015:

```posh
VSDevMode.ps1 14 -tsScript <path to your folder>/node_modules/typescript/lib
```

针对 VS 2013:

```posh
VSDevMode.ps1 12 -tsScript <path to your folder>/node_modules/typescript/lib
```

### IntelliJ IDEA (Mac)

前往 `Preferences` > `Languages & Frameworks` > `TypeScript`:

> TypeScript Version:若通过 npm 安装则为:`/usr/local/lib/node_modules/typescript/lib`

### IntelliJ IDEA (Windows)

前往 `File` > `Settings` > `Languages & Frameworks` > `TypeScript`:

> TypeScript Version:若通过 npm 安装则为:`C:\Users\USERNAME\AppData\Roaming\npm\node_modules\typescript\lib`