Skip to content

Commit

Permalink
style: output error logs when adding a new command.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Mar 31, 2023
1 parent 49ec723 commit c3f463d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/compile.ts
Expand Up @@ -30,6 +30,8 @@ export async function compile(options: CompileOptions = {}) {
' \x1b[31;1mThe files you need to compile have been indexed:\x1b[0m\n',
];
(options.entry || []).forEach((fileNames) => err.push(` \x1b[35;1m${fileNames}\x1b[0m`));
!options.entry?.length &&
err.push('\x1b[33;1mNo files were indexed. Please check your command line arguments.\x1b[0m');
throw new Error(err.join('\n'));
}
babelTransform(options);
Expand Down

0 comments on commit c3f463d

Please sign in to comment.