本文整理汇总了TypeScript中gulp-conventional-changelog.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
gulp.task('changelog', () => {
return gulp.src('CHANGELOG.md')
.pipe(gulpChangelog({
preset: 'angular',
releaseCount: 1
},{
// Conventional Changelog Context
// We have to manually set version number so it doesn't get prefixed with `v`
// See https://github.com/conventional-changelog/conventional-changelog-core/issues/10
currentTag: rootPkg.version
}))
.pipe(gulp.dest('./'));
});
示例2: src
task('changelog', async () => {
// Show the instructions for the changelog generation.
showChangelogInstructions();
// Cancel the generation when the latest tag is the same as the version from the "package.json".
if (await getLatestSemverTag() === buildConfig.projectVersion) {
console.error(red('Warning: Changelog won\'t change because the "package.json" version is ' +
'equal to the latest Git tag.\n'));
return;
}
return src(changelogFile)
.pipe(gulpChangelog(changelogOptions))
.pipe(dest('./'));
});
示例3: src
task('changelog', async () => {
// Show the instructions for the changelog generation.
showChangelogInstructions();
// Cancel the generation when the latest tag is the same as the version from the "package.json".
if (await getLatestSemverTag() === buildConfig.projectVersion) {
console.error(red('Warning: Changelog won\'t change because the "package.json" version is ' +
'equal to the latest Git tag.\n'));
return;
}
const {releaseName} = await prompt<{releaseName: string}>({
type: 'text',
name: 'releaseName',
message: 'What should be the name of the release?'
});
return src(changelogFile)
.pipe(gulpChangelog(changelogOptions, {title: releaseName}, null, null,
createDedupeWriterOptions()))
.pipe(dest('./'));
});
示例4:
gulp.task(':release:changelog', () => {
return gulp.src('CHANGELOG.md', { buffer: false })
.pipe(changelog({ preset: 'angular' }))
.pipe(gulp.dest('./'));
});