问题
I installed gulp-tag-version, but when I am running the command 'gulp tag v1.1.1', it will not confirm this as a task
var gulp = require('gulp');
var tag_version = require('gulp-tag-version');
gulp.task('tag', function() {
return gulp.src(['./package.json']).pipe(tag_version());
});
So what am I doing wrong ?
回答1:
It looks like it has been added correct. The command however would be:
gulp tag
Which would look at the version in your package.json file and tag the last commit with it.
Refer to this example for more advanced features:
https://www.npmjs.com/package/gulp-tag-version#advanced-example-gulpfile-with-bumping-and-commiting
来源:https://stackoverflow.com/questions/32005849/gulp-tag-version-running-command