var gulp = require('gulp');
var ghPages = require('gulp-gh-pages');
var markdown = require('gulp-markdown');
var rename = require("gulp-rename");
var htmlreplace = require('gulp-html-replace');

gulp.task('markdown', function () {
    return gulp.src('README.md')
        .pipe(rename("index.md"))
        .pipe(markdown())
        .pipe(gulp.dest('examples'));
});

gulp.task('copy-minitracker', function () {
    return gulp.src('build/minitracker.js')
        .pipe(gulp.dest('dist'));
});

gulp.task('build', ['copy-minitracker', 'markdown'], function () {
    return gulp.src('examples/**/*')
        .pipe(htmlreplace({
            'minitracker': '../minitracker.js'
        }))
        .pipe(gulp.dest('dist'));
});

gulp.task('deploy', ['build'], function() {
    return gulp.src('./examples/**/*')
        .pipe(ghPages());
});

@@ -502,17 +502,151 @@
 sk('
-build', %5B
+copy-examples', function () %7B%0A    return gulp.src('examples/**/*')%0A        .pipe(gulp.dest('dist'));%0A%7D);%0A%0Agulp.task('build', %5B'copy-examples', 
 'cop
@@ -714,32 +714,37 @@
 c('examples/**/*
+.html
 ')%0A        .pipe
@@ -923,24 +923,20 @@
 .src('./
-examples
+dist
 /**/*')%0A

Update build example process