Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: When the staticDir is set by the env, capure an error. #436

Merged
merged 1 commit into from
Sep 8, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ program
.version(packageJson.version)
.option('-p, --port [number]', 'Port to run Storybook (Required)', parseInt)
.option('-h, --host [string]', 'Host to run Storybook')
.option('-s, --static-dir <dir-names>', 'Directory where to load static files from', parseList)
.option('-s, --static-dir <dir-names>', 'Directory where to load static files from')
.option('-c, --config-dir [dir-name]', 'Directory where to load Storybook configurations from')
.option('-d, --db-path [db-file]', 'File where to store addon database JSON file')
.option('--enable-db', 'Enable the (experimental) addon database service on dev-server')
Expand Down Expand Up @@ -53,6 +53,7 @@ if (program.host) {
const app = express();

if (program.staticDir) {
program.staticDir = parseList(program.staticDir);
program.staticDir.forEach(dir => {
const staticPath = path.resolve(dir);
if (!fs.existsSync(staticPath)) {
Expand Down