Skip to content
This repository has been archived by the owner on Dec 25, 2018. It is now read-only.

Commit

Permalink
Added versioning bump tasks and updated to 2.01.
Browse files Browse the repository at this point in the history
+Cleaned up gulp tasks.
  • Loading branch information
electricessence committed Oct 5, 2015
1 parent 1125ff6 commit 8834ffe
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "TypeScript.NET",
"version": "2.0.0",
"version": "2.0.1",
"ignore": [
".gitignore",
".idea",
Expand Down
40 changes: 31 additions & 9 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -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(
Expand Down Expand Up @@ -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',
Expand All @@ -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')
Expand All @@ -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();
});
});
Expand All @@ -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',
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "TypeScript.NET",
"version": "2.0.0",
"version": "2.0.1",
"license": "MIT",
"author": "Oren Ferrari",
"author": "electricessence <oren@electrified.net>",
"description": "A JavaScript Friendly .NET Based Library Ported to TypeScript.",
"private": false,
"repository": "https://github.com/electricessence/TypeScript.NET.git",
Expand All @@ -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",
Expand All @@ -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"
Expand Down

0 comments on commit 8834ffe

Please sign in to comment.