diff --git a/packages/vant/docs/formatChangelog.mjs b/packages/vant/docs/formatChangelog.mjs new file mode 100644 index 000000000..5ef24fa46 --- /dev/null +++ b/packages/vant/docs/formatChangelog.mjs @@ -0,0 +1,60 @@ +/** + * This script is used to format changelog which is generated by GitHub + * because we need to paste it to the changelog page of Vant website. + */ + +// paste changelog here +const changelog = ``; + +changelog.split('\n').map((line) => { + // Skip unused lines + if ( + line.startsWith('> Please refer to') || + line.startsWith('release:') || + line.includes("What's Changed") || + line.includes('Full Changelog') || + line.includes('docs(changelog)') + ) { + return; + } + + if (line.startsWith('