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

Suppress verbose build output #3487

Merged
merged 3 commits into from
Apr 25, 2018
Merged
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions app/angular/src/server/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { includePaths, excludePaths, nodeModulesPaths, loadEnv, nodePaths } from
import babelLoaderConfig from './babel';
import { version } from '../../../package.json';

export default function(configDir) {
export default function(configDir, quiet) {
const config = {
mode: 'development',
devtool: 'cheap-module-source-map',
Expand Down Expand Up @@ -60,12 +60,13 @@ export default function(configDir) {
new CaseSensitivePathsPlugin(),
new WatchMissingNodeModulesPlugin(nodeModulesPaths),
new webpack.ProgressPlugin(),
quiet ? null : new webpack.ProgressPlugin(),
new webpack.ContextReplacementPlugin(
/angular(\\|\/)core(\\|\/)(@angular|esm5)/,
path.resolve(__dirname, '../src')
),
new Dotenv({ silent: true }),
],
].filter(Boolean),
module: {
rules: [
{
Expand Down
6 changes: 3 additions & 3 deletions app/mithril/src/server/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { includePaths, excludePaths, nodeModulesPaths, loadEnv, nodePaths } from
import babelLoaderConfig from './babel';
import { version } from '../../../package.json';

export default function(configDir) {
export default function(configDir, quiet) {
const config = {
mode: 'development',
devtool: 'cheap-module-source-map',
Expand Down Expand Up @@ -59,9 +59,9 @@ export default function(configDir) {
new webpack.HotModuleReplacementPlugin(),
new CaseSensitivePathsPlugin(),
new WatchMissingNodeModulesPlugin(nodeModulesPaths),
new webpack.ProgressPlugin(),
quiet ? null : new webpack.ProgressPlugin(),
new Dotenv({ silent: true }),
],
].filter(Boolean),
module: {
rules: [
{
Expand Down
5 changes: 3 additions & 2 deletions app/polymer/src/server/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { includePaths, excludePaths, nodeModulesPaths, loadEnv, nodePaths } from
import babelLoaderConfig from './babel';
import { version } from '../../../package.json';

export default function(configDir) {
export default function(configDir, quiet) {
const config = {
mode: 'development',
devtool: 'cheap-module-source-map',
Expand Down Expand Up @@ -60,8 +60,9 @@ export default function(configDir) {
new CaseSensitivePathsPlugin(),
new WatchMissingNodeModulesPlugin(nodeModulesPaths),
new webpack.ProgressPlugin(),
quiet ? null : new webpack.ProgressPlugin(),
new Dotenv({ silent: true }),
],
].filter(Boolean),
module: {
rules: [
{
Expand Down
6 changes: 3 additions & 3 deletions app/react/src/server/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { includePaths, excludePaths, nodeModulesPaths, loadEnv, nodePaths } from
import babelLoaderConfig from './babel';
import { version } from '../../../package.json';

export default function(configDir) {
export default function(configDir, quiet) {
const config = {
mode: 'development',
devtool: 'cheap-module-source-map',
Expand Down Expand Up @@ -59,9 +59,9 @@ export default function(configDir) {
new webpack.HotModuleReplacementPlugin(),
new CaseSensitivePathsPlugin(),
new WatchMissingNodeModulesPlugin(nodeModulesPaths),
new webpack.ProgressPlugin(),
quiet ? null : new webpack.ProgressPlugin(),
new Dotenv({ silent: true }),
],
].filter(Boolean),
module: {
rules: [
{
Expand Down
6 changes: 3 additions & 3 deletions app/vue/src/server/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { includePaths, excludePaths, nodeModulesPaths, loadEnv, nodePaths } from
import babelLoaderConfig from './babel';
import { version } from '../../../package.json';

export default function(configDir) {
export default function(configDir, quiet) {
const config = {
mode: 'development',
devtool: 'cheap-module-source-map',
Expand Down Expand Up @@ -59,9 +59,9 @@ export default function(configDir) {
new webpack.HotModuleReplacementPlugin(),
new CaseSensitivePathsPlugin(),
new WatchMissingNodeModulesPlugin(nodeModulesPaths),
new webpack.ProgressPlugin(),
quiet ? null : new webpack.ProgressPlugin(),
new Dotenv({ silent: true }),
],
].filter(Boolean),
module: {
rules: [
{
Expand Down
1 change: 1 addition & 0 deletions docs/src/pages/configurations/cli-options/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Here are all those options:
-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
--quiet Suppress verbose build output

## For build-storybook

Expand Down
3 changes: 2 additions & 1 deletion lib/core/src/server/build-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export function buildDev({ packageJson, getBaseConfig, loadConfig, defaultFavIco
.option('--ssl-cert <cert>', 'Provide an SSL certificate. (Required with --https)')
.option('--ssl-key <key>', 'Provide an SSL key. (Required with --https)')
.option('--smoke-test', 'Exit after successful start')
.option('--quiet', 'Suppress verbose build output')
.option('-d, --db-path [db-file]', 'DEPRECATED!')
.option('--enable-db', 'DEPRECATED!')
.parse(process.argv);
Expand Down Expand Up @@ -132,7 +133,7 @@ export function buildDev({ packageJson, getBaseConfig, loadConfig, defaultFavIco

// NOTE changes to env should be done before calling `getBaseConfig`
// `getBaseConfig` function which is called inside the middleware
app.use(storybook(configDir, loadConfig, getBaseConfig));
app.use(storybook(configDir, loadConfig, getBaseConfig, program.quiet));

let serverResolve = () => {};
let serverReject = () => {};
Expand Down
4 changes: 2 additions & 2 deletions lib/core/src/server/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ export const webpackValid = new Promise((resolve, reject) => {
webpackReject = reject;
});

export default function(configDir, loadConfig, getBaseConfig) {
export default function(configDir, loadConfig, getBaseConfig, quiet) {
// Build the webpack configuration using the `getBaseConfig`
// custom `.babelrc` file and `webpack.config.js` files
const config = loadConfig('DEVELOPMENT', getBaseConfig(configDir), configDir);
const config = loadConfig('DEVELOPMENT', getBaseConfig(configDir, quiet), configDir);
const middlewareFn = getMiddleware(configDir);

// remove the leading '/'
Expand Down