From 6eea0d190e1388454aa58b419f515cbd5e1ea649 Mon Sep 17 00:00:00 2001 From: Kasra Bigdeli Date: Sun, 13 Jan 2019 10:08:41 -0800 Subject: [PATCH] reformat --- build_and_publish_to_github_pages.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/build_and_publish_to_github_pages.js b/build_and_publish_to_github_pages.js index 99eb249..e4f0da9 100644 --- a/build_and_publish_to_github_pages.js +++ b/build_and_publish_to_github_pages.js @@ -7,17 +7,20 @@ const pathOfV1 = path.join(pathOfPublic, 'v1'); const pathOfApps = path.join(pathOfV1, 'apps'); const pathOfList = path.join(pathOfV1, 'autoGeneratedList.json'); -fs.readdir(pathOfApps, function(err, items) { +fs.readdir(pathOfApps, function (err, items) { for (var i = 0; i < items.length; i++) { - items[i] = items[i].replace('.json', '') + items[i] = items[i].replace('.json', ''); } fs.outputJsonSync(pathOfList, { appList: items - }) - - ghpages.publish('public', function(err) { - console.log(err) }); -}); + ghpages.publish('public', function (err) { + if (err) + console.log(err); + else + console.log('Built and deployed successfully'); + }); + +}); \ No newline at end of file