mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-27 07:51:52 +00:00
Merge pull request #352 from PR0M3TH3AN/init-output-summary-11038938146603193612
Enhance torch init output with configuration summary and dashboard link
This commit is contained in:
1 file changed
+7
-1
+7
-1
@@ -328,11 +328,16 @@ export async function cmdInit(force = false, cwd = process.cwd(), mockAnswers =
|
||||
installAppAssets(paths.torchDir, installDir);
|
||||
installTorchAssets(paths, installDir);
|
||||
configureTorch(cwd, paths, installDir, namespace, relays, hashtag);
|
||||
createDashboardLinkFile(paths, namespace, relays, hashtag);
|
||||
const dashboardUrl = createDashboardLinkFile(paths, namespace, relays, hashtag);
|
||||
injectHostScriptsIfNeeded(paths, installDir);
|
||||
|
||||
console.log('\nInitialization complete.');
|
||||
console.log('You can now customize the files in ' + path.relative(cwd, paths.torchDir) + '/');
|
||||
|
||||
console.log(`\n● From torch-config.json:`);
|
||||
console.log(`\n - Hashtag: ${hashtag}`);
|
||||
console.log(` - Namespace: ${namespace}\n`);
|
||||
console.log(dashboardUrl);
|
||||
}
|
||||
|
||||
function createDashboardLinkFile(paths, namespace, relays, hashtag) {
|
||||
@@ -358,6 +363,7 @@ To change these settings, edit \`torch-config.json\` in your project root.
|
||||
const filePath = path.join(paths.torchDir, 'TORCH_DASHBOARD.md');
|
||||
fs.writeFileSync(filePath, content, 'utf8');
|
||||
console.log(`Created ${path.relative(paths.root, filePath)}`);
|
||||
return dashboardUrl;
|
||||
}
|
||||
|
||||
function injectScriptsIntoHost(hostRoot, installDirName) {
|
||||
|
||||
Reference in new issue
Block a user