Skip to content

Commit

Permalink
Remove deprecated gulp tasks and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbrunel committed Aug 28, 2016
1 parent 15528d4 commit fe34de5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 51 deletions.
49 changes: 0 additions & 49 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down Expand Up @@ -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']);
Expand Down Expand Up @@ -135,57 +130,13 @@ 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'))
.pipe(jshint.reporter('jshint-stylish'))
.pipe(jshint.reporter('fail'));
}


function validHTMLTask() {
return gulp.src('samples/*.html')
.pipe(htmlv());
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
},
Expand Down

0 comments on commit fe34de5

Please sign in to comment.