Include tmlanguage computed file in repo as we'll need it for github linguist (#2872)

To register a tm language on github linguist we need to publish our
grammar.
Instructions
https://github.com/github-linguist/linguist/blob/master/CONTRIBUTING.md#adding-a-language
This commit is contained in:
Timothee Guerin 2024-02-08 20:07:46 -08:00 коммит произвёл GitHub
Родитель 24d3ba0add
Коммит afd377242e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
5 изменённых файлов: 1288 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,8 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: internal
packages:
- "@typespec/compiler"
---
Include tmlanguage computed file in repo as we'll need it for github linguist

Просмотреть файл

@ -58,3 +58,6 @@ eng/feeds/
# Skip formatting tsp files
*.noformat.tsp
# Tm Grammars generated files
grammars/

Просмотреть файл

@ -107,6 +107,7 @@ ignorePaths:
- "**/.docusaurus/**"
- "**/CHANGELOG.md"
- "**/coverage/**"
- "grammars/**"
- packages/website/build/**
- common/scripts/*
- "**/ThirdPartyNotices.txt"

1271
grammars/typespec.json Normal file

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -903,6 +903,11 @@ export async function main() {
const plist = await tm.emitPList(grammar, {
errorSourceFilePath: resolve("./src/tmlanguage.ts"),
});
const json = await tm.emitJSON(grammar, {
errorSourceFilePath: resolve("./src/tmlanguage.ts"),
});
await mkdir("./dist", { recursive: true });
await writeFile("./dist/typespec.tmLanguage", plist);
await mkdir("../../grammars", { recursive: true });
await writeFile("../../grammars/typespec.json", json);
}