From aa2c1b8ef1a8c5bc9f69d2b22756b9392cd1240c Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 7 Jan 2018 14:11:28 -0500 Subject: [PATCH] Added twitter to gulp script. --- gulpfile.js | 11 ++++++++++- site/layouts/index.html | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 412c2823..fefb9d20 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -22,7 +22,8 @@ gulp.task('default', ['start:setup'], callback => { }); gulp.task('all', ['start:setup'], callback => { - runSequence(['assets:js', 'assets:scss'], + runSequence(['scripts:twitter'], + ['assets:js', 'assets:scss'], 'hugo', 'assets:images', finalCommand, @@ -49,6 +50,14 @@ gulp.task('start:setup', () => { util.log(`process.env.HUGO_BASEURL = '${process.env.HUGO_BASEURL}'`); }); +gulp.task('scripts:twitter', callback => { + exec(`cd ./scripts/shared-hugo-scripts/twitter/ && npm install && node app.js`, (err, stdout, stderr) => { + console.log(stdout); + console.log(stderr); + callback(err); + }); +}); + gulp.task('assets:images', () => { const baseImages = gulp.src(`build/images/*`, {base: './'}) .pipe(gulp.dest('./')); diff --git a/site/layouts/index.html b/site/layouts/index.html index 92fb574f..8fea73c0 100644 --- a/site/layouts/index.html +++ b/site/layouts/index.html @@ -3,7 +3,7 @@
- {{ range .Site.Data.twitter }} + {{ range sort .Site.Data.twitter "order" }}
{{ partial "widget/tweet.html" . }}