From e2ef8d991eb105573e0a62cfe9a3eacd0fe60fd0 Mon Sep 17 00:00:00 2001 From: Michael Krotscheck Date: Fri, 31 Jul 2015 09:53:58 +1000 Subject: Added gh-pages invocation for release --- .gitignore | 1 + gulpfile.js | 14 ++++++++++++++ package.json | 5 +++-- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c825564..b4f2bf6 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ bower_components .idea *.iml dist +.publish diff --git a/gulpfile.js b/gulpfile.js index 4ea26d3..cffd79c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -8,6 +8,7 @@ var gulp = require('gulp'); var git = require('gulp-git'); + var ghPages = require('gulp-gh-pages'); var filter = require('gulp-filter'); var less = require('gulp-less'); var webserver = require('gulp-webserver'); @@ -215,6 +216,19 @@ */ gulp.task('package', ['package:html', 'package:hbs', 'package:libs']); + /** + * Push the contents of the dist directory to gh-pages. + */ + gulp.task('gh-pages', function () { + return gulp.src(dir.dist + '/**/*') + .pipe(ghPages()); + }); + + /** + * Build the current release package and push it to gh-pages. + */ + gulp.task('release', ['package', 'gh-pages']); + /** * Start a local server and serve the application code. This is * equivalent to opening index.html in a browser. diff --git a/package.json b/package.json index 65441f5..cdafc8d 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "postinstall": "bower install", "start": "gulp serve", "prestart": "gulp package", - "prepublish": "gulp package", - "new": "gulp new" + "new": "gulp new", + "release": "gulp release" }, "author": { "name": "Michael Krotscheck", @@ -24,6 +24,7 @@ "gulp": "^3.9.0", "gulp-compile-handlebars": "^0.5.0", "gulp-filter": "^3.0.0", + "gulp-gh-pages": "^0.5.2", "gulp-git": "^1.2.4", "gulp-ignore": "^1.2.1", "gulp-less": "^3.0.3", -- cgit v1.2.3