diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-12-03 18:20:41 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-12-03 18:20:41 +0900 |
| commit | 55ef4c5faa7073ec9bfdbeb3fb43590c7c5dd580 (patch) | |
| tree | 6fbd5df5ad058783ef3dbfbfeee500d5129c824c /packages/backend/scripts | |
| parent | fix action (diff) | |
| download | misskey-55ef4c5faa7073ec9bfdbeb3fb43590c7c5dd580.tar.gz misskey-55ef4c5faa7073ec9bfdbeb3fb43590c7c5dd580.tar.bz2 misskey-55ef4c5faa7073ec9bfdbeb3fb43590c7c5dd580.zip | |
tweak convert_config
Diffstat (limited to 'packages/backend/scripts')
| -rw-r--r-- | packages/backend/scripts/convert_config.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/backend/scripts/convert_config.js b/packages/backend/scripts/convert_config.js index 32576621cb..e93baa409a 100644 --- a/packages/backend/scripts/convert_config.js +++ b/packages/backend/scripts/convert_config.js @@ -25,13 +25,16 @@ const configDir = resolve(_dirname, '../../../.config'); */ function convertYamlToJson(ymlPath, jsonPath) { if (!fs.existsSync(ymlPath)) { - console.log(`${ymlPath} が見つからないためスキップします`); + console.log(`skipped: ${ymlPath} is not found`); return; } const yamlContent = fs.readFileSync(ymlPath, 'utf-8'); const jsonContent = yaml.load(yamlContent); - fs.writeFileSync(jsonPath, JSON.stringify(jsonContent, null, 2), 'utf-8'); + fs.writeFileSync(jsonPath, JSON.stringify({ + '_NOTE_': 'This file is auto-generated from YAML file. DO NOT EDIT.', + ...jsonContent, + }), 'utf-8'); console.log(`✓ ${ymlPath} → ${jsonPath}`); } @@ -53,4 +56,4 @@ if (process.env.MISSKEY_CONFIG_YML) { convertYamlToJson(customYmlPath, customJsonPath); } -console.log('設定ファイルの変換が完了しました'); +console.log('Configuration compiled'); |