From fe34de58e74772723a3417121c1f521f87012bda Mon Sep 17 00:00:00 2001 From: Simon Brunel Date: Sun, 28 Aug 2016 18:25:15 +0200 Subject: [PATCH] Remove deprecated gulp tasks and dependencies --- gulpfile.js | 49 ------------------------------------------------- package.json | 2 -- 2 files changed, 51 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index e278e159f07..14a2e1df596 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -10,10 +10,7 @@ var gulp = require('gulp'), htmlv = require('gulp-html-validator'), insert = require('gulp-insert'), zip = require('gulp-zip'), - inquirer = require('inquirer'), - semver = require('semver'), exec = require('child_process').exec, - fs = require('fs'), package = require('./package.json'), karma = require('gulp-karma'), browserify = require('browserify'), @@ -54,8 +51,6 @@ gulp.task('build', buildTask); gulp.task('package', packageTask); gulp.task('coverage', coverageTask); gulp.task('watch', watchTask); -gulp.task('bump', bumpTask); -gulp.task('release', ['build'], releaseTask); gulp.task('jshint', jshintTask); gulp.task('test', ['jshint', 'validHTML', 'unittest']); gulp.task('size', ['library-size', 'module-sizes']); @@ -135,49 +130,6 @@ function packageTask() { .pipe(gulp.dest(outDir)); } -/* - * Usage : gulp bump - * Prompts: Version increment to bump - * Output: - New version number written into package.json - */ -function bumpTask(complete) { - util.log('Current version:', util.colors.cyan(package.version)); - var choices = ['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease'].map(function(versionType) { - return versionType + ' (v' + semver.inc(package.version, versionType) + ')'; - }); - inquirer.prompt({ - type: 'list', - name: 'version', - message: 'What version update would you like?', - choices: choices - }, function(res) { - var increment = res.version.split(' ')[0], - newVersion = semver.inc(package.version, increment), - oldVersion = package.version; - - // Set the new versions into the package object - package.version = newVersion; - - // Write these to their own files, then build the output - fs.writeFileSync('package.json', JSON.stringify(package, null, 2)); - - var oldCDN = 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/'+oldVersion+'/Chart.min.js', - newCDN = 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/'+newVersion+'/Chart.min.js'; - - gulp.src(['./README.md']) - .pipe(replace(oldCDN, newCDN)) - .pipe(gulp.dest('./')); - - complete(); - }); -} - - -function releaseTask() { - exec('git tag -a v' + package.version); -} - - function jshintTask() { return gulp.src(srcDir + '**/*.js') .pipe(jshint('config.jshintrc')) @@ -185,7 +137,6 @@ function jshintTask() { .pipe(jshint.reporter('fail')); } - function validHTMLTask() { return gulp.src('samples/*.html') .pipe(htmlv()); diff --git a/package.json b/package.json index a7feccad2ad..2d64bc8ad39 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ "gulp-umd": "~0.2.0", "gulp-util": "~2.2.x", "gulp-zip": "~3.2.0", - "inquirer": "^0.5.1", "jasmine": "^2.3.2", "jasmine-core": "^2.3.4", "jquery": "^2.1.4", @@ -42,7 +41,6 @@ "karma-jasmine": "^0.3.6", "karma-jasmine-html-reporter": "^0.1.8", "merge-stream": "^1.0.0", - "semver": "^3.0.1", "vinyl-source-stream": "^1.1.0", "watchify": "^3.7.0" },