From efa042091613155b66ea0882b841761b1bd3d367 Mon Sep 17 00:00:00 2001 From: Yonathan Benolol Date: Mon, 5 Feb 2018 09:42:58 +0200 Subject: [PATCH 1/2] Using path.sep instea of '/' for multi platform support --- src/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils.js b/src/utils.js index d5e24e1..90c3593 100644 --- a/src/utils.js +++ b/src/utils.js @@ -84,9 +84,9 @@ function generateQuestions(config = {}, questions = {}) { * @param {array} dir */ function createListOfDirectories(prev, dir) { - return { +return { ...prev, - [dir.split('/').pop()]: dir, + [dir.split(path.sep).pop()]: dir, } } From 1cf97af9de0ed674b3534d034a0a47b2dfac3c1f Mon Sep 17 00:00:00 2001 From: Yonathan Benolol Date: Mon, 5 Feb 2018 09:44:24 +0200 Subject: [PATCH 2/2] Fixed indentation --- src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index 90c3593..9f448e3 100644 --- a/src/utils.js +++ b/src/utils.js @@ -84,7 +84,7 @@ function generateQuestions(config = {}, questions = {}) { * @param {array} dir */ function createListOfDirectories(prev, dir) { -return { + return { ...prev, [dir.split(path.sep).pop()]: dir, }