Skip to content

Commit 2d6f28b

Browse files
authored
Update getstarted doc (Azure#25318)
fixes Azure#25310
1 parent 60f2449 commit 2d6f28b

File tree

7 files changed

+24
-24
lines changed

7 files changed

+24
-24
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,5 +171,5 @@ code-model-*
171171

172172
# CPU profiles
173173
*.cpuprofile
174-
# cadl sparse checkout
175-
TempCadlFiles/
174+
# Temp typespec files
175+
TempTypeSpecFiles/

.scripts/automation_generate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env bash
2-
code-gen-pipeline --inputJsonPath=$1 --outputJsonPath=$2 --use=@autorest/typescript@6.0.0-rc.9 --cadlEmitter=@azure-tools/cadl-typescript
2+
code-gen-pipeline --inputJsonPath=$1 --outputJsonPath=$2 --use=@autorest/typescript@6.0.0-rc.10 --cadlEmitter=@azure-tools/typespec-ts

documentation/RLC-Swagger-quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ We are working on to automatically generate everything right now, but currently
4747
security: AADToken
4848
security-scopes: https://farmbeats.azure.net/.default
4949
use-extension:
50-
"@autorest/typescript": "6.0.0-rc.8"
50+
"@autorest/typescript": "6.0.0-rc.10"
5151
```
5252
~~~
5353

documentation/RLC-quickstart.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Getting Started - Generate the RLC rest-level client libraries with Cadl
1+
Getting Started - Generate the RLC rest-level client libraries with TypeSpec
22
========================================================================
33

44
# Before you start
@@ -27,24 +27,24 @@ We are working on to automatically generate everything right now, but currently
2727

2828
1. **Add TypeScript emitter dependency in package.json**
2929

30-
In Cadl project, modify `package.json` to add dependency for TypeScript emitter, then run `npm install` again to install `@azure-tools/cadl-typescript`.
30+
In TypeSpec project, modify `package.json` to add dependency for TypeScript emitter, then run `npm install` again to install `@azure-tools/typespec-ts`.
3131

3232
```json
3333
"dependencies": {
3434
...
35-
"@azure-tools/cadl-typescript": "latest"
35+
"@azure-tools/typespec-ts": "latest"
3636
},
3737
```
3838

39-
2. **Configure TypeScript emitter in cadl-project.yaml**
39+
2. **Configure TypeScript emitter in tspconfig.yaml**
4040

41-
In Cadl project, modify (or create) `cadl-project.yaml` and configure the SDK generated, using the emitter options on `@azure-tools/cadl-typescript`
41+
In TypeSpec project, modify (or create) `tspconfig.yaml` and configure the SDK generated, using the emitter options on `@azure-tools/typespec-ts`
4242

4343
```yaml
4444
emit:
45-
- "@azure-tools/cadl-typescript"
45+
- "@azure-tools/typespec-ts"
4646
options:
47-
"@azure-tools/cadl-typescript":
47+
"@azure-tools/typespec-ts":
4848
title: Farmbeats
4949
generateMetadata: true
5050
generateTest: true
@@ -56,7 +56,7 @@ We are working on to automatically generate everything right now, but currently
5656

5757
```
5858

59-
Here, we need to replace the value in `name`,`description`, `version` in `packageDetails` to **your own service's** package details. Also we have some other options, you could refer to [the link](https://github.com/Azure/autorest.typescript/tree/main/packages/cadl-typescript#emitter-options) for more details.
59+
Here, we need to replace the value in `name`,`description`, `version` in `packageDetails` to **your own service's** package details. Also we have some other options, you could refer to [the link](https://github.com/Azure/autorest.typescript/tree/main/packages/typespec-ts#emitter-options) for more details.
6060

6161
---
6262
**NOTE**
@@ -89,10 +89,10 @@ We are working on to automatically generate everything right now, but currently
8989

9090
We need to configure `--output-dir` to put generated code. The output dir contains two parts: the {SDK_REPO_ROOT} and {PROJECT_ROOT}.
9191

92-
Assume **{SDK_REPO_ROOT}** is `D:/azure-sdk-for-js` and **{PROJECT_ROOT}** is `sdk/agrifood/agrifood-farming-rest` then we could run this command in **your local Cadl project** to generate the SDK:
92+
Assume **{SDK_REPO_ROOT}** is `D:/azure-sdk-for-js` and **{PROJECT_ROOT}** is `sdk/agrifood/agrifood-farming-rest` then we could run this command in **your local TypeSpec project** to generate the SDK:
9393

9494
```shell
95-
cadl compile . --emit=@azure-tools/cadl-typescript --output-dir=D:/azure-sdk-for-js/sdk/agrifood/agrifood-farming-rest
95+
npx tsp compile . --emit=@azure-tools/typespec-ts --output-dir=D:/azure-sdk-for-js/sdk/agrifood/agrifood-farming-rest
9696
```
9797

9898
After this finishes, you will see the generated code in `src` folder in your **{PROJECT_ROOT}**.
@@ -264,7 +264,7 @@ Please notice the Artifacts name should align with your package name. Here the p
264264

265265
# Prepare PR
266266

267-
Cadl emitter can only help you generate SDK code, there is something you need to update manually:
267+
TypeScript emitter can only help you generate SDK code, there is something you need to update manually:
268268

269269
## CHANGELOG.md
270270

eng/emitter-package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"main": "dist/src/index.js",
33
"dependencies": {
4-
"@azure-tools/cadl-typescript": "1.0.0-beta.8",
5-
"@cadl-lang/versioning": "0.38.0"
4+
"@azure-tools/typespec-ts": "0.11.0",
5+
"@typespec/versioning": "0.42.0"
66
}
77
}

eng/scripts/Language-Settings.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ function Confirm-NodeInstallation
2020
}
2121

2222
function Get-javascript-EmitterName() {
23-
return "@azure-tools/cadl-typescript"
23+
return "@azure-tools/typespec-ts"
2424
}
2525

2626
function Get-javascript-EmitterAdditionalOptions([string]$projectDirectory) {
27-
return "--option @azure-tools/cadl-typescript.emitter-output-dir=$projectDirectory/"
27+
return "--option @azure-tools/typespec-ts.emitter-output-dir=$projectDirectory/"
2828
}
2929

3030
function Get-javascript-PackageInfoFromRepo ($pkgPath, $serviceDirectory) {
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"dependencies": {
3-
"@azure-tools/cadl-typescript": "1.0.0-beta.10",
4-
"@azure-tools/cadl-autorest": "0.26.0",
5-
"@cadl-lang/eslint-config-cadl": "0.5.0",
6-
"@cadl-lang/eslint-plugin": "0.40.0",
7-
"@cadl-lang/library-linter": "0.40.0"
3+
"@azure-tools/typespec-ts": "0.11.0",
4+
"@azure-tools/typespec-autorest": "0.28.0",
5+
"@typespec/eslint-config-typespec": "0.6.0",
6+
"@typespec/eslint-plugin": "0.42.0",
7+
"@typespec/library-linter": "0.42.0"
88
}
99
}

0 commit comments

Comments
 (0)