Comparing version 0.0.6 to 0.0.9
const gulp = require('gulp'); | ||
const uglify = require('gulp-uglify'); | ||
const rename = require('gulp-rename'); | ||
const git = require('gulp-git'); | ||
const bump = require('gulp-bump'); | ||
const filter = require('gulp-filter'); | ||
const tagVersion = require('gulp-tag-version'); | ||
const inc = (importance) => { | ||
return gulp.src('./package.json') | ||
.pipe(bump({ type: importance })) | ||
.pipe(gulp.dest('.')) | ||
.pipe(git.commit('Bump version')) | ||
.pipe(filter('package.json')) | ||
.pipe(tagVersion()); | ||
}; | ||
gulp.task('uglify', () => { | ||
@@ -21,3 +34,27 @@ gulp.src('./src/build-url.js') | ||
gulp.task('patch', () => { | ||
return inc('patch'); | ||
}); | ||
gulp.task('feature', () => { | ||
return inc('minor'); | ||
}); | ||
gulp.task('release', () => { | ||
return inc('major'); | ||
}); | ||
gulp.task('publish', () => { | ||
if (process.argv.indexOf('--patch') !== -1) { | ||
gulp.run('patch'); | ||
} | ||
if (process.argv.indexOf('--feature') !== -1) { | ||
gulp.run('minor'); | ||
} | ||
if (process.argv.indexOf('--release') !== -1) { | ||
gulp.run('release'); | ||
} | ||
}); | ||
gulp.task('build', ['uglify', 'copy']); | ||
gulp.task('default', ['build', 'watch']); |
{ | ||
"name": "build-url", | ||
"version": "0.0.6", | ||
"version": "0.0.9", | ||
"description": "A small library that builds a URL given it's components", | ||
@@ -27,3 +27,7 @@ "main": "./dist/build-url.js", | ||
"gulp": "3.9.0", | ||
"gulp-bump": "1.0.0", | ||
"gulp-filter": "3.0.1", | ||
"gulp-git": "1.6.0", | ||
"gulp-rename": "1.2.2", | ||
"gulp-tag-version": "1.3.0", | ||
"gulp-uglify": "1.5.1", | ||
@@ -30,0 +34,0 @@ "jasmine": "2.4.1" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9720
215
8