Skip to content

Commit

Permalink
style: Fixed typos in Console logs (#577)
Browse files Browse the repository at this point in the history
  • Loading branch information
hmt authored Aug 13, 2023
1 parent 8938c62 commit 915f173
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/histoire/src/node/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion packages/histoire/src/node/collect/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/histoire/src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`))
}
}

Expand Down

0 comments on commit 915f173

Please sign in to comment.