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() {
|
function watchFileChange() {
|
||||||
|
logger.watch('Compiled successfully, watching file changes...');
|
||||||
|
|
||||||
chokidar.watch(SRC_DIR).on('change', async path => {
|
chokidar.watch(SRC_DIR).on('change', async path => {
|
||||||
const logger = getInteractiveLogger();
|
const logger = getInteractiveLogger();
|
||||||
const esPath = path.replace(SRC_DIR, ES_DIR);
|
const esPath = path.replace(SRC_DIR, ES_DIR);
|
||||||
|
@ -24,7 +24,10 @@ export function getStepper(totalStep: number) {
|
|||||||
|
|
||||||
export function getInteractiveLogger() {
|
export function getInteractiveLogger() {
|
||||||
const interactive = new logger.Signale({
|
const interactive = new logger.Signale({
|
||||||
interactive: true
|
interactive: true,
|
||||||
|
config: {
|
||||||
|
displayTimestamp: true
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return interactive;
|
return interactive;
|
||||||
|
@ -18,7 +18,7 @@ command('lint').action(lint);
|
|||||||
command('clean').action(clean);
|
command('clean').action(clean);
|
||||||
|
|
||||||
command('build')
|
command('build')
|
||||||
.option('--watch', 'Watch file watch')
|
.option('--watch', 'Watch file change')
|
||||||
.action(build);
|
.action(build);
|
||||||
|
|
||||||
command('release').action(release);
|
command('release').action(release);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user