Skip to content

Commit c3f463d

Browse files
committedMar 31, 2023
style: output error logs when adding a new command.
1 parent 49ec723 commit c3f463d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎packages/core/src/compile.ts

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ export async function compile(options: CompileOptions = {}) {
3030
' \x1b[31;1mThe files you need to compile have been indexed:\x1b[0m\n',
3131
];
3232
(options.entry || []).forEach((fileNames) => err.push(` \x1b[35;1m${fileNames}\x1b[0m`));
33+
!options.entry?.length &&
34+
err.push('\x1b[33;1mNo files were indexed. Please check your command line arguments.\x1b[0m');
3335
throw new Error(err.join('\n'));
3436
}
3537
babelTransform(options);

0 commit comments

Comments
 (0)
Please sign in to comment.