From 665b226a071accd089fdc7de24c143fc93ea492e Mon Sep 17 00:00:00 2001 From: BinHong Lee Date: Sat, 27 Oct 2018 20:01:49 -0700 Subject: [PATCH] Added new pathing check to see if it is imported --- testflow.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/testflow.js b/testflow.js index f305753..d0582e7 100644 --- a/testflow.js +++ b/testflow.js @@ -6,7 +6,12 @@ // node testflow mydialog.txt const fs = require("fs"); -const SourceCodeFile = './sampleskill/index.js'; +SourceCodeFile = './sampleskill/index.js'; + +if (fs.existsSync('./src/index.js')) { + SourceCodeFile = '../src/index.js'; +} + const handlerName = 'handler'; //'lambda_handler' @@ -641,4 +646,4 @@ function buildSlotObj(slotname, val) { // BgMagenta = "\x1b[45m", // BgCyan = "\x1b[46m", // BgWhite = "\x1b[47m" -// }; \ No newline at end of file +// };