Added twitter to gulp script.

This commit is contained in:
Chris 2018-01-07 14:11:28 -05:00
parent ee438545e0
commit aa2c1b8ef1
2 changed files with 11 additions and 2 deletions

View File

@ -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('./'));

View File

@ -3,7 +3,7 @@
<div class="container">
<section class="section">
<div class="columns is-multiline">
{{ range .Site.Data.twitter }}
{{ range sort .Site.Data.twitter "order" }}
<div class="column is-one-third">
{{ partial "widget/tweet.html" . }}
</div>