mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(cli): improve build watch mode logger
This commit is contained in:
parent
ec1c87f8ae
commit
eafcc128a2
@ -173,6 +173,8 @@ async function buildPackageEntry() {
|
||||
}
|
||||
|
||||
function watchFileChange() {
|
||||
logger.watch('Compiled successfully, watching file changes...');
|
||||
|
||||
chokidar.watch(SRC_DIR).on('change', async path => {
|
||||
const logger = getInteractiveLogger();
|
||||
const esPath = path.replace(SRC_DIR, ES_DIR);
|
||||
|
@ -24,7 +24,10 @@ export function getStepper(totalStep: number) {
|
||||
|
||||
export function getInteractiveLogger() {
|
||||
const interactive = new logger.Signale({
|
||||
interactive: true
|
||||
interactive: true,
|
||||
config: {
|
||||
displayTimestamp: true
|
||||
}
|
||||
});
|
||||
|
||||
return interactive;
|
||||
|
@ -18,7 +18,7 @@ command('lint').action(lint);
|
||||
command('clean').action(clean);
|
||||
|
||||
command('build')
|
||||
.option('--watch', 'Watch file watch')
|
||||
.option('--watch', 'Watch file change')
|
||||
.action(build);
|
||||
|
||||
command('release').action(release);
|
||||
|
Loading…
x
Reference in New Issue
Block a user