From 85539881742b65a62b3b4e21b1255854d5a31a45 Mon Sep 17 00:00:00 2001 From: barakcoh Date: Mon, 6 Mar 2017 10:35:50 +0200 Subject: [PATCH] add projectDir as a packager projectRoot --- src/bin/storybook-start.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin/storybook-start.js b/src/bin/storybook-start.js index 07ca405..fd9855b 100644 --- a/src/bin/storybook-start.js +++ b/src/bin/storybook-start.js @@ -27,9 +27,11 @@ server.listen(...listenAddr, function (err) { console.info(`\nReact Native Storybook started on => ${address}\n`); }); +const projectRoots = configDir === projectDir ? [configDir] : [configDir, projectDir]; + // RN packager shelljs.exec([ 'node node_modules/react-native/local-cli/cli.js start', - `--projectRoots ${configDir}`, + `--projectRoots ${projectRoots.join(',')}`, `--root ${projectDir}`, ].join(' '), {async: true});