Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jose Mauel Heredia Hidalgo committed May 26, 2023
1 parent 824fe06 commit 31faa3f
Show file tree
Hide file tree
Showing 38 changed files with 28 additions and 309 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { formatFile } from "../utils/format";
export async function emitCadlConfig(filePath: string): Promise<void> {
const content = `
emit:
- "@azure-tools/typespec-autorest": true
- "@azure-tools/typespec-autorest":
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,17 @@ import { CadlProgram } from "../interfaces";
import { formatFile } from "../utils/format";

export async function emitPackage(filePath: string, program: CadlProgram): Promise<void> {
const session = getSession();
// Default to false;
const includePackage = session.configuration["include-package"] === true;

if (!includePackage) {
return;
}

const name = program.serviceInformation.name.toLowerCase().replace(/ /g, "-");
const description = program.serviceInformation.doc;
const content = JSON.stringify(getPackage(name, description as string));
const session = getSession();
session.writeFile({ filename: filePath, content: formatFile(content, filePath) });
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ clear-output-folder: false
guessResourceKey: true
isAzureSpec: true
namespace: "Azure.Language.Authoring"
include-package: true
modelerfour:
lenient-model-deduplication: true
prenamer: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
emit:
- "@azure-tools/typespec-autorest": true
- "@azure-tools/typespec-autorest":
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
emit:
- "@azure-tools/typespec-autorest": true
- "@azure-tools/typespec-autorest":
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
emit:
- "@azure-tools/typespec-autorest": true
- "@azure-tools/typespec-autorest":
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
emit:
- "@azure-tools/typespec-autorest": true
- "@azure-tools/typespec-autorest":
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
emit:
- "@azure-tools/typespec-autorest": true
- "@azure-tools/typespec-autorest":
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
emit:
- "@azure-tools/typespec-autorest": true
- "@azure-tools/typespec-autorest":
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
emit:
- "@azure-tools/typespec-autorest": true
- "@azure-tools/typespec-autorest":
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
emit:
- "@azure-tools/typespec-autorest": true
- "@azure-tools/typespec-autorest":
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
emit:
- "@azure-tools/typespec-autorest": true
- "@azure-tools/typespec-autorest":
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
emit:
- "@azure-tools/typespec-autorest": true
- "@azure-tools/typespec-autorest":
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
emit:
- "@azure-tools/typespec-autorest": true
- "@azure-tools/typespec-autorest":
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
emit:
- "@azure-tools/typespec-autorest": true
- "@azure-tools/typespec-autorest":
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
emit:
- "@azure-tools/typespec-autorest": true
- "@azure-tools/typespec-autorest":
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
emit:
- "@azure-tools/typespec-autorest": true
- "@azure-tools/typespec-autorest":
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
emit:
- "@azure-tools/typespec-autorest": true
- "@azure-tools/typespec-autorest":
# Uncomment this line and add "@azure-tools/typespec-python" to your package.json to generate Python code
# "@azure-tools/typespec-python":
# "basic-setup-py": true
Expand Down
Loading

0 comments on commit 31faa3f

Please sign in to comment.