Storybook: Allow disabling the progressbar plugin with a commandline flag

Created on 12 Jun 2017  路  19Comments  路  Source: storybookjs/storybook

I'm using custom config as suggested in https://storybook.js.org/basics/writing-stories/#loading-stories-dynamically to dynamically load stories.

is there a way to tame the CLI outputs of start-storybook a little bit? cause currently it's too noisy to me
screen shot 2017-06-12 at 14 40 43

babel / webpack feature request help wanted inactive

Most helpful comment

You can disable this with:

https://github.com/storybookjs/storybook/blob/c604b2626b70bbd0ddbd38fe61242a9ff79690c1/lib/core/src/server/cli/dev.js#L29

from the docs:

For start-storybook

Usage: start-storybook [options]

Options:

--help                        output usage information
-V, --version                 output the version number
-p, --port [number]           Port to run Storybook
-h, --host [string]           Host to run Storybook
-s, --static-dir <dir-names>  Directory where to load static files from, comma-separated list
-c, --config-dir [dir-name]   Directory where to load Storybook configurations from
--https                       Serve Storybook over HTTPS. Note: You must provide your own certificate > information.
--ssl-ca <ca>                 Provide an SSL certificate authority. (Optional with --https, required if using a self-signed certificate)
--ssl-cert <cert>             Provide an SSL certificate. (Required with --https)
--ssl-key <key>               Provide an SSL key. (Required with --https)
--smoke-test                  Exit after successful start
--ci                          CI mode (skip interactive prompts, don't open browser)
--quiet                       Suppress verbose build output
--no-dll                      Do not use dll reference
--debug-webpack               Display final webpack configurations for debugging purposes

All 19 comments

Was just about to ask about this myself. It clashes with my default dev task CLI output. :)

oh ya, another issue I get is the building modules never really get to 100%,
always stuck in 69% but my stories are loaded just fine in the browser

screen shot 2017-06-12 at 14 53 25

Hey, Guys!
I'm not sure what the reason for the new CLI behavior but in my case, I just need to make the shell window wide enough to collapse all this output into the only one line:

image

I'm for silencing the webpack progress by default. The output makes configuring compilation on IDEs like WebStorm a nightmare as well.

Has anyone tried progress-bar-webpack-plugin yet?

This was introduced in version 3.1.2.
Reverting to 3.0.1 removes the progress output. Looking at the release notes, there doesn't seem to be anything related to build progress output.

It was introduced in this commit, that add adds the ProgressPlugin: https://github.com/storybooks/storybook/commit/7c707f6de2ca392ee6b0e00ce9133059412d1591

Temporary fix is to remove the plugin from webpack config you create:

const webpack = require('webpack');

module.exports = (config, env) => {
  config.plugins = config.plugins.filter(plugin => !(plugin instanceof webpack.ProgressPlugin))

  return config;
};

@thebuilder the release notes are a concatenation of every closed PR that is not labeled with the cleanup (reserved for minor fixes like typos).

@ndelangen we should be more disciplined about not lumping too many separate issues into PR's

@thebuilder yeah but unfortunately it's not that easy to alter the storybook's webpack config in a project created by CRA or CRNA.

@shilman well, a small & focus PR is always better, right?

@luftywiranda13 @ndelangen did some seriously heavy lifting on the project, e.g. enabling strict linting (for which we should all be grateful!) and it would have been impractical to split it up into many PR's. the downside is that when we get sloppy, stuff like this doesn't make it into the changelog.

I'm sorry if this inconvenienced you! I can try write a ProgressPlugin myself that doesn't have this issue. but of course the best option would be for me or someone else to actually fix this in webpack.

We should actually file a bug for this on webpack ProgressPlugin.

I have been looking for a good entry point to start contributing to webpack, but I fear that it would mean I'd get too much on my plate. There's only so much I can do.

I'm trying to be disciplined and only do 1 thing in 1 PR, but of course the fact is also there's a lot going on.


@danielduan I have tried the progress-bar-webpack-plugin, it's not as informative as the regular webpack ProgressPlugin.


@luftywiranda13 It's not actually stuck, it does reach 100%, but the terminal doesn't print the output right. It's probably that the ProgressPlugin doesn't account for the max-length (screen-width) of the terminal correctly, causing line that are supposed to be on 1 line wrap to 2 lines.


@thebuilder Thanks for sharing your solution!

@ndelangen I think it's fine with a ProgressPlugin - Just think it should be possible to disable and/or configure it.

A --no-progress command in the CLI options would be a great start. 馃憤

@ndelangen to have it be configurable from storybook sounds good to me, I agree with @thebuilder

Toggleable sounds OK to me.

So who's interested in turning this issue into a PR?
@luftywiranda13 @thebuilder @danielduan ?

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!

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!

So what hapened here?

Storybook 5.3 still fills up my console with epic spam:

image

Storybook: Let me tell you a story of high adventure
Me:
download

You can disable this with:

https://github.com/storybookjs/storybook/blob/c604b2626b70bbd0ddbd38fe61242a9ff79690c1/lib/core/src/server/cli/dev.js#L29

from the docs:

For start-storybook

Usage: start-storybook [options]

Options:

--help                        output usage information
-V, --version                 output the version number
-p, --port [number]           Port to run Storybook
-h, --host [string]           Host to run Storybook
-s, --static-dir <dir-names>  Directory where to load static files from, comma-separated list
-c, --config-dir [dir-name]   Directory where to load Storybook configurations from
--https                       Serve Storybook over HTTPS. Note: You must provide your own certificate > information.
--ssl-ca <ca>                 Provide an SSL certificate authority. (Optional with --https, required if using a self-signed certificate)
--ssl-cert <cert>             Provide an SSL certificate. (Required with --https)
--ssl-key <key>               Provide an SSL key. (Required with --https)
--smoke-test                  Exit after successful start
--ci                          CI mode (skip interactive prompts, don't open browser)
--quiet                       Suppress verbose build output
--no-dll                      Do not use dll reference
--debug-webpack               Display final webpack configurations for debugging purposes
Was this page helpful?
0 / 5 - 0 ratings