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

Config directory #1994

Closed
josephchang opened this issue Oct 9, 2017 · 7 comments
Closed

Config directory #1994

josephchang opened this issue Oct 9, 2017 · 7 comments

Comments

@josephchang
Copy link

With the 3.3.0 releases, it looks like --config-dir/-c is not being used anymore, but in favour SBCONFIG_CONFIG_DIR, is this likely to change once it goes out of alpha, or is it going to stay?

@shilman
Copy link
Member

shilman commented Oct 9, 2017

From what I can tell:

  • SBCONFIG_CONFIG_DIR has been around for months
  • SBCONFIG_CONFIG_DIR is an alternative way to specify the config dir via env variable, but --config-dir / -c still works just fine

Hope that helps!

@josephchang
Copy link
Author

I recently upgraded to 3.3.0-alpha.2 and encountered errors, and found that in server/config/utils.js, a new getConfigDir function had been added, which seems to ignore the command line option.

var getConfigDir = exports.getConfigDir = function getConfigDir() {
 return process.env.SBCONFIG_CONFIG_DIR || './.storybook';
};

I'm not sure what other regression errors it has caused, but for me, it no longer loaded preview-head.html into iframe.html.ejs. webpack.config(.prod).js use the above function to get the contents of that file, but it was looking in ./.storybook/preview-head.html without setting SBCONFIG_CONFIG_DIR.

@stale
Copy link

stale bot commented Nov 23, 2017

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 60 days. Thanks!

@stale stale bot added the inactive label Nov 23, 2017
@zdrummond
Copy link

I have a very similar issue with 3.3.0-alpha.4', but only with preview-head.html`.

  1. Start on a main line release of Storybook, like what I am using 3.2.15
  2. Setup your config directory somewhere other than /.storybook, add a preview-head.html to that directory and pass -c to the start-storybook.
  3. Run storybook and see your `preview-head.html' injected
  4. Upgrade to alpha 4
  5. Run again and your preview-head changes are gone
  6. Move config and preview-head to /.storybook
  7. Run once more and now see your preview-head changes.

@stale stale bot removed the inactive label Dec 1, 2017
@skovy
Copy link
Contributor

skovy commented Dec 18, 2017

I couldn't find this issue with googling, but I had this same issue and using the ENV var seems to fix the issue.

#2501

@stale
Copy link

stale bot commented Feb 1, 2018

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 60 days. Thanks!

@stale stale bot added the inactive label Feb 1, 2018
@stale
Copy link

stale bot commented Feb 16, 2018

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

@stale stale bot closed this as completed Feb 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants