本文整理匯總了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('./'));
});