Skip to content

Commit

Permalink
feat: optimize outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
fu050409 committed Nov 15, 2024
1 parent b8f56f9 commit 1bd296b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/core/src/server/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ import {
ResolvedUserConfig,
UserConfig
} from '../config/types.js';
import { bold, brandColor, green } from '../utils/color.js';
import {
resolveServerUrls,
setupSIGTERMListener,
teardownSIGTERMListener
} from '../utils/http.js';
import { printServerUrls } from '../utils/logger.js';
import { isObject } from '../utils/share.js';
import { getShortName } from '../utils/path.js';
import { isObject, version } from '../utils/share.js';
import { knownJavascriptExtensionRE } from '../utils/url.js';
import {
type CommonServerOptions,
Expand Down Expand Up @@ -224,6 +226,14 @@ export class PreviewServer extends httpServer {
'preview'
);

const shortFile = getShortName(
this.resolvedUserConfig.configFilePath,
this.resolvedUserConfig.root
);
this.logger.info(`Using config file at ${bold(green(shortFile))}`);

console.log('\n', bold(brandColor(`${'ϟ'} Farm v${version}`)), '\n');

printServerUrls(
this.resolvedUrls,
this.previewServerOptions.host,
Expand Down

0 comments on commit 1bd296b

Please sign in to comment.