mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-10 09:41:52 +02:00
chore(editor): rename constant, simplify Makefile help comment
Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
This commit is contained in:
parent
f905f5e138
commit
693752eb49
2
Makefile
2
Makefile
@ -662,7 +662,7 @@ generate-images: | node_modules ## generate images
|
||||
cd tools && node generate-images.ts $(TAGS)
|
||||
|
||||
.PHONY: generate-codemirror-languages
|
||||
generate-codemirror-languages: | node_modules ## refresh assets/codemirror-languages.json from github-linguist
|
||||
generate-codemirror-languages: | node_modules ## generate codemirror-languages.json
|
||||
node tools/generate-codemirror-languages.ts
|
||||
|
||||
.PHONY: generate-manpage
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
import {load as parseYaml} from 'js-yaml';
|
||||
import {writeFile} from 'node:fs/promises';
|
||||
|
||||
const LINGUIST_URL = 'https://raw.githubusercontent.com/github-linguist/linguist/main/lib/linguist/languages.yml';
|
||||
const linguistUrl = 'https://raw.githubusercontent.com/github-linguist/linguist/main/lib/linguist/languages.yml';
|
||||
|
||||
// Map github-linguist language names to the names CodeMirror's @codemirror/language-data
|
||||
// uses. Only languages that we want to load with extended extension/filename data are
|
||||
@ -106,8 +106,8 @@ type CmLanguage = {
|
||||
};
|
||||
|
||||
async function main() {
|
||||
const res = await fetch(LINGUIST_URL); // eslint-disable-line no-restricted-globals -- node build script, not browser code
|
||||
if (!res.ok) throw new Error(`fetch ${LINGUIST_URL} failed: ${res.status}`);
|
||||
const res = await fetch(linguistUrl); // eslint-disable-line no-restricted-globals -- node build script, not browser code
|
||||
if (!res.ok) throw new Error(`fetch ${linguistUrl} failed: ${res.status}`);
|
||||
const linguist = parseYaml(await res.text()) as Record<string, LinguistEntry>;
|
||||
|
||||
const out: CmLanguage[] = [];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user