From c57da27c6a3e6627809dffcb0cd17f385969cebb Mon Sep 17 00:00:00 2001 From: David Merfield Date: Wed, 16 Jan 2019 09:59:25 -0500 Subject: [PATCH] Added guide to rebuild script --- scripts/entry/rebuild.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/entry/rebuild.js b/scripts/entry/rebuild.js index 7ca675238d1..27c69043369 100644 --- a/scripts/entry/rebuild.js +++ b/scripts/entry/rebuild.js @@ -1,6 +1,13 @@ var get = require("../get/entry"); var sync = require("../../app/sync"); +if (!process.argv[2]) { + console.log( + "Please pass a URL to a blog post as the first and only argument to this script. Blot will rebuild the entry which exists at that URL." + ); + process.exit(); +} + get(process.argv[2], function(err, user, blog, entry) { if (err) throw err; sync(blog.id, function(err, folder, done) { @@ -9,6 +16,8 @@ get(process.argv[2], function(err, user, blog, entry) { if (err) throw err; done(null, function(err) { if (err) throw err; + console.log('Rebuilt:', process.argv[2]); + process.exit(); }); }); });