mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(cli): changelog should be async task
This commit is contained in:
parent
f9bef02730
commit
23b1af95e8
@ -46,25 +46,28 @@ function transform(item: any) {
|
|||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function changelog() {
|
export async function changelog() {
|
||||||
logger.start('Generating changelog...');
|
logger.start('Generating changelog...');
|
||||||
|
|
||||||
conventionalChangelog(
|
return new Promise(resolve => {
|
||||||
{
|
conventionalChangelog(
|
||||||
preset: 'angular'
|
{
|
||||||
},
|
preset: 'angular'
|
||||||
null,
|
},
|
||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
{
|
null,
|
||||||
mainTemplate,
|
{
|
||||||
headerPartial,
|
mainTemplate,
|
||||||
commitPartial,
|
headerPartial,
|
||||||
transform
|
commitPartial,
|
||||||
}
|
transform
|
||||||
)
|
}
|
||||||
.pipe(createWriteStream(DIST_FILE))
|
)
|
||||||
.on('close', () => {
|
.pipe(createWriteStream(DIST_FILE))
|
||||||
logger.success(`Generated changelog at ${DIST_FILE}`);
|
.on('close', () => {
|
||||||
});
|
logger.success(`Generated changelog at ${DIST_FILE}`);
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ class VantCliReleasePlugin extends releaseIt.Plugin {
|
|||||||
console.log('');
|
console.log('');
|
||||||
|
|
||||||
await build();
|
await build();
|
||||||
changelog();
|
await changelog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user