Use hugo-bin from within gulpfile.js instead of an external dependency in travis.
This commit is contained in:
parent
97162d0dd7
commit
df00552aff
|
@ -28,13 +28,11 @@ before_script:
|
|||
- node app.js
|
||||
- cd $TRAVIS_BUILD_DIR
|
||||
|
||||
- echo '========== Installing gulp / hugo dependencies =========='
|
||||
- echo '========== Installing gulp & dependencies =========='
|
||||
- sudo apt-get install graphicsmagick
|
||||
- convert -help
|
||||
- yarn global add @alrra/travis-scripts
|
||||
- yarn global add gulp
|
||||
- yarn global add hugo-bin
|
||||
- hugo version
|
||||
|
||||
- echo '========== Configuring Github Pages =========='
|
||||
- git config --global user.email "citra+citrabotweb@citra-emu.org"
|
||||
|
|
12
gulpfile.js
12
gulpfile.js
|
@ -42,11 +42,9 @@ gulp.task('setup', function(cb) {
|
|||
rimraf(`${distPath}`, cb);
|
||||
});
|
||||
|
||||
// PHASE 2 - Data Dependencies
|
||||
|
||||
// PHASE 3 - Building
|
||||
// PHASE 2 - Building
|
||||
gulp.task('hugo', function (cb) {
|
||||
exec('hugo -s ./site/ -d ../public/ -v', function (err, stdout, stderr) {
|
||||
exec('$(npm bin)/hugo -s ./site/ -d ../public/ -v', function (err, stdout, stderr) {
|
||||
console.log(stdout);
|
||||
console.log(stderr);
|
||||
cb(err);
|
||||
|
@ -80,13 +78,13 @@ gulp.task('images', ['hugo'], () => (
|
|||
.pipe(gulp.dest(`${distPath}/images/screenshots/thumbs`))
|
||||
));
|
||||
|
||||
// This task ensures all phases up to PHASE 3 are completed.
|
||||
// This task ensures all phases up to PHASE 2 are completed.
|
||||
gulp.task('build', ['hugo', 'css', 'images'], function (done) {
|
||||
browsersync.reload();
|
||||
done();
|
||||
});
|
||||
|
||||
// STAGE 4 - Optimization
|
||||
// STAGE 3 - Optimization
|
||||
gulp.task('compress', ['build'], () => (
|
||||
gulp.src(`${distPath}/js/**/*.js`, {base: './'})
|
||||
.pipe(md5(10, `${distPath}/**/*.html`))
|
||||
|
@ -100,7 +98,7 @@ gulp.task('compress', ['build'], () => (
|
|||
.pipe(gulp.dest('./'))
|
||||
));
|
||||
|
||||
// STAGE 5 - Deploy
|
||||
// STAGE 4 - Deploy
|
||||
|
||||
// Used for Development
|
||||
gulp.task('serve', ['build'], () => {
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
"gulp-postcss": "^7.0.0",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-util": "^3.0.8",
|
||||
"hugo-bin": "^0.7.0",
|
||||
"postcss-cssnext": "^2.9.0",
|
||||
"postcss-import": "^8.2.0",
|
||||
"rimraf": "^2.6.1"
|
||||
|
|
Reference in New Issue