diff --git a/bower.json b/bower.json index f186ba9f..5e8b37e9 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "TypeScript.NET", - "version": "2.0.0", + "version": "2.0.1", "ignore": [ ".gitignore", ".idea", diff --git a/gulpfile.js b/gulpfile.js index 398dd8b8..5d868e08 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,11 +1,8 @@ -"use strict"; +'use strict'; var gulp = require('gulp'); -var del = require('del'); -var replace = require('gulp-replace'); -var EVENT_END = 'end'; - +const EVENT_END = 'end'; const DOCS = './documentation'; gulp.task( @@ -78,7 +75,9 @@ gulp.task( var typedoc = require('gulp-typedoc'), rename = require('gulp-rename'), - htmlMinify = require('gulp-html-minify'); + replace = require('gulp-replace'), + htmlMinify = require('gulp-html-minify'), + del = require('del'); var typedocOptions = { name: 'TypeScript.NET', @@ -93,14 +92,14 @@ gulp.task( }; // Step 1: Render type-docs.. - console.log("TypeDocs: rendering"); + console.log('TypeDocs: rendering'); gulp .src('source') .pipe(typedoc(typedocOptions)) .on(EVENT_END, function() { // Step 2-A: Fix for issue with search that places a [BACK-SLASH] instead of a [SLASH]. - console.log("TypeDocs: applying fixes"); + console.log('TypeDocs: applying fixes'); const SEARCH_FOLDER = DOCS + '/assets/js'; gulp .src(SEARCH_FOLDER + '/search.js') @@ -121,7 +120,7 @@ gulp.task( .on(EVENT_END, function() { // Step 3: Delete all old underscored html files. del.sync(DOCS + '/**/_*.html', function() { - console.log("TypeDocs: fixes complete"); + console.log('TypeDocs: fixes complete'); done(); }); }); @@ -132,6 +131,29 @@ gulp.task( } ); +function bumpVersion(type) { + var fs = require('fs'), + semver = require('semver'), + bump = require('gulp-bump'); + + var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf8')); + // increment version + var newVer = semver.inc(pkg.version, type); + + return gulp.src(['./bower.json', './package.json']) + .pipe(bump({ version: newVer })) + .pipe(gulp.dest('./')); + +} + +gulp.task('version-bump-patch', function() { + bumpVersion('patch'); +}); + +gulp.task('version-bump-minor', function() { + bumpVersion('minor'); +}); + gulp.task('default', [ 'typescript', 'typescript.min', diff --git a/package.json b/package.json index c027ee3d..e44655e4 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "TypeScript.NET", - "version": "2.0.0", + "version": "2.0.1", "license": "MIT", - "author": "Oren Ferrari", + "author": "electricessence ", "description": "A JavaScript Friendly .NET Based Library Ported to TypeScript.", "private": false, "repository": "https://github.com/electricessence/TypeScript.NET.git", @@ -12,7 +12,9 @@ "devDependencies": { "bower": "^1.5.2", "del": "^2.0.2", + "fs": "0.0.2", "gulp": "^3.9.0", + "gulp-bump": "^1.0.0", "gulp-html-minify": "0.0.12", "gulp-rename": "^1.2.2", "gulp-replace": "^0.5.4", @@ -21,6 +23,7 @@ "gulp-typedoc": "^1.2.1", "gulp-typescript": "^2.8.3", "gulp-uglify": "^1.4.1", + "semver": "^5.0.3", "tsd": "^0.6.4", "typedoc": "^0.3.10", "typescript": "^1.6.2"