diff --git a/packages/histoire/src/node/build.ts b/packages/histoire/src/node/build.ts index 0be8643b..7966d866 100644 --- a/packages/histoire/src/node/build.ts +++ b/packages/histoire/src/node/build.ts @@ -206,9 +206,9 @@ export async function build (ctx: Context) { const duration = performance.now() - startTime if (emptyStoryCount) { - console.warn(pc.yellow(`⚠️ ${emptyStoryCount} empty story file`)) + console.warn(pc.yellow(`⚠️ ${emptyStoryCount} empty story file${emptyStoryCount === 1 ? '':'s'}`)) } - console.log(pc.green(`✅ Built ${storyCount} stories (${variantCount} variants) in ${Math.round(duration / 1000 * 100) / 100}s`)) + console.log(pc.green(`✅ Built ${storyCount} stor${storyCount === 1 ? 'y':'ies'} (${variantCount} variant${variantCount === 1 ? '':'s'}) in ${Math.round(duration / 1000 * 100) / 100}s`)) // Render if (previewStoryCallbacks.length) { diff --git a/packages/histoire/src/node/collect/index.ts b/packages/histoire/src/node/collect/index.ts index ed74b02e..93c135ee 100644 --- a/packages/histoire/src/node/collect/index.ts +++ b/packages/histoire/src/node/collect/index.ts @@ -45,7 +45,7 @@ export function useCollectStories (options: UseCollectStoriesOptions, ctx: Conte const threadsCount = ctx.mode === 'dev' ? Math.max(Math.min(maxThreads, Math.floor(cpus().length / 2)), 1) : Math.max(Math.min(maxThreads, cpus().length - 1), 1) - console.log(pc.blue(`Using ${threadsCount} threads for story collection`)) + console.log(pc.blue(`Using ${threadsCount} thread${threadsCount === 1 ? '':'s'} for story collection`)) const threadPool = new Tinypool({ filename: new URL('./worker.js', import.meta.url).href, diff --git a/packages/histoire/src/node/config.ts b/packages/histoire/src/node/config.ts index 51b94d9f..31660384 100644 --- a/packages/histoire/src/node/config.ts +++ b/packages/histoire/src/node/config.ts @@ -298,7 +298,7 @@ export async function processConfig (ctx: Context) { const fileCheck = (file: string, resolvedFile: string, configPathForError: string) => { if (!file.startsWith('http') && !file.startsWith('@') && !fs.existsSync(resolvedFile)) { - console.warn(pc.yellow(`Histoire config: ${configPathForError} file ${file} does not exist (resolved to ${resolvedFile}), check for typos in the paths`)) + console.warn(pc.yellow(`Histoire config: ${configPathForError} file ${file} does not exist (resolved to ${resolvedFile}), check for typos in the path`)) } }