citra-emu
/
citra-web
Archived
1
0
Fork 0

Use hugo-bin from within gulpfile.js instead of an external dependency in travis.

This commit is contained in:
chris062689 2017-06-27 18:54:43 -04:00
parent 97162d0dd7
commit df00552aff
3 changed files with 7 additions and 10 deletions

View File

@ -28,13 +28,11 @@ before_script:
- node app.js - node app.js
- cd $TRAVIS_BUILD_DIR - cd $TRAVIS_BUILD_DIR
- echo '========== Installing gulp / hugo dependencies ==========' - echo '========== Installing gulp & dependencies =========='
- sudo apt-get install graphicsmagick - sudo apt-get install graphicsmagick
- convert -help - convert -help
- yarn global add @alrra/travis-scripts - yarn global add @alrra/travis-scripts
- yarn global add gulp - yarn global add gulp
- yarn global add hugo-bin
- hugo version
- echo '========== Configuring Github Pages ==========' - echo '========== Configuring Github Pages =========='
- git config --global user.email "citra+citrabotweb@citra-emu.org" - git config --global user.email "citra+citrabotweb@citra-emu.org"

View File

@ -42,11 +42,9 @@ gulp.task('setup', function(cb) {
rimraf(`${distPath}`, cb); rimraf(`${distPath}`, cb);
}); });
// PHASE 2 - Data Dependencies // PHASE 2 - Building
// PHASE 3 - Building
gulp.task('hugo', function (cb) { 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(stdout);
console.log(stderr); console.log(stderr);
cb(err); cb(err);
@ -80,13 +78,13 @@ gulp.task('images', ['hugo'], () => (
.pipe(gulp.dest(`${distPath}/images/screenshots/thumbs`)) .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) { gulp.task('build', ['hugo', 'css', 'images'], function (done) {
browsersync.reload(); browsersync.reload();
done(); done();
}); });
// STAGE 4 - Optimization // STAGE 3 - Optimization
gulp.task('compress', ['build'], () => ( gulp.task('compress', ['build'], () => (
gulp.src(`${distPath}/js/**/*.js`, {base: './'}) gulp.src(`${distPath}/js/**/*.js`, {base: './'})
.pipe(md5(10, `${distPath}/**/*.html`)) .pipe(md5(10, `${distPath}/**/*.html`))
@ -100,7 +98,7 @@ gulp.task('compress', ['build'], () => (
.pipe(gulp.dest('./')) .pipe(gulp.dest('./'))
)); ));
// STAGE 5 - Deploy // STAGE 4 - Deploy
// Used for Development // Used for Development
gulp.task('serve', ['build'], () => { gulp.task('serve', ['build'], () => {

View File

@ -15,6 +15,7 @@
"gulp-postcss": "^7.0.0", "gulp-postcss": "^7.0.0",
"gulp-rename": "^1.2.2", "gulp-rename": "^1.2.2",
"gulp-util": "^3.0.8", "gulp-util": "^3.0.8",
"hugo-bin": "^0.7.0",
"postcss-cssnext": "^2.9.0", "postcss-cssnext": "^2.9.0",
"postcss-import": "^8.2.0", "postcss-import": "^8.2.0",
"rimraf": "^2.6.1" "rimraf": "^2.6.1"