Closed mitchrenton closed 8 years ago
Crap, I think I know what it is. I forgot to change how you pipe the commands in upload.js
. Give me a few minutes and I'll push a fix.
Okay, I've pushed a new version of generator-statisk
to NPM. You can update generator-jekyllized
by running npm update -g generator-jekyllized
and then run yo jekyllized:update
in your site. Note that any changes you've made in the gulp tasks will be overwritten, so back them up if you've made any substantial changes :)
Thanks for getting back to me quickly.
I've followed your instructions, and I still get the same error. I deleted my node_modules
folder and ran npm install
to check something wasn't missing there.
Any other ideas?
You actually overwrote the upload.js
file as well? I updated it locally from NPM and ran the same commands and it works here. Anyhow, the thing to fix is to remove $.
in front of ghPages
, as it's not used anymore.
But that should happen when you run yo jekyllized:update
and overwrite the uploading.js
file since it's been updated.
Ok so I did some more digging and I removed the $
preceding ghPages
and also added the capitalised P
in the const
declaration. Here's what I ended up with and the deployment to GitHub is working as expected.
'use strict';
const gulp = require('gulp');
const ghPages = require('gulp-gh-pages');
// 'gulp deploy' -- pushes your dist folder to Github
gulp.task('upload', () => {
return gulp.src('dist/**/*', {dot: true})
.pipe(ghPages({
branch: 'master'
}));
});
Crap, yeah, I fixed the capitalization issue as well, but it should be working fine now if you update the generator and run the update command, but oh well, glad to know it's working though!
Cool. Thanks!
I'm getting the following error when I run
gulp deploy
ReferenceError: $ is not defined at /Users/mitchrenton/Web/Git Repositories/cleverbiscuit.com/gulp/tasks/uploading.js:8:11 at taskWrapper (/Users/mitchrenton/Web/Git Repositories/cleverbiscuit.com/node_modules/undertaker/lib/set-task.js:13:15) at bound (domain.js:287:14) at runBound (domain.js:300:12) at asyncRunner (/Users/mitchrenton/Web/Git Repositories/cleverbiscuit.com/node_modules/async-done/index.js:36:18) at nextTickCallbackWith0Args (node.js:452:9) at process._tickCallback (node.js:381:13) at Function.Module.runMain (module.js:449:11) at startup (node.js:139:18) at node.js:999:3
I have the repository initialised and a remote origin set. There are no other configurations for the GiHub pages deployment right?
I did edit the uploading.js file as mentioned in your readme.md as it's a personal site.
gulp.task('upload', () => {
return gulp.src('dist/**/*')
.pipe($.ghPages({
branch: 'master'
}));
});
I've used this generator on another project before and had the deployments working.
Any idea what the problem could be?