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

Commit

Permalink
Move to an actually maintained gh-pages package
Browse files Browse the repository at this point in the history
The previous one hasn't been updated in quite a while and has a few very
annoying bugs as well. This should fix that.
  • Loading branch information
sondr3 committed Aug 23, 2016
1 parent cbe7904 commit 2023713
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion generators/gulp/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module.exports = generators.Base.extend({
}

if (this.options.uploading === 'Github Pages') {
pkg.devDependencies['gulp-gh-pages'] = '^0.5.2';
pkg.devDependencies['gh-pages'] = '^0.11.0';
}

this.fs.writeJSON(this.destinationPath('package.json'), pkg);
Expand Down
12 changes: 8 additions & 4 deletions generators/gulp/templates/tasks/uploading.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,16 @@ gulp.task('upload', () => {
});
<% } -%><% if (ghpages) { -%>
const gulp = require('gulp');
const ghPages = require('gulp-gh-pages');
const path = require('path');
const ghPages = require('gh-pages');

// 'gulp deploy' -- pushes your dist folder to Github
gulp.task('upload', () => {
return gulp.src('dist/**/*', {dot: true})
.pipe(ghPages());
gulp.task('upload', (done) => {
ghPages.publish(path.join(__dirname + '/../../', 'dist'), {
dotfiles: true,
// branch: "master"
},
done);
});
<% } -%>
<% if (noUpload) { -%>
Expand Down
2 changes: 1 addition & 1 deletion test/gulp/uploading/ghpages.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test('does not create credentials files', () => {
test('contain correct uploading packages', () => {
assert.jsonFileContent('package.json', {
devDependencies: {
'gulp-gh-pages': '^0.5.2'
'gh-pages': '^0.11.0'
}
});
});
Expand Down

0 comments on commit 2023713

Please sign in to comment.