Skip to content

Commit

Permalink
Merge pull request #3487 from bmson/baldvin/verbose
Browse files Browse the repository at this point in the history
Suppress verbose build output
# Conflicts:
#	app/mithril/src/server/config/webpack.config.js
  • Loading branch information
Hypnosphi committed Apr 27, 2018
1 parent 5320fb3 commit 555600f
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 13 deletions.
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 @@ -12,7 +12,7 @@ import babelLoaderConfig from './babel';
import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils';
import { version } from '../../../package.json';

export default function(configDir) {
export default function(configDir, quiet) {
const config = {
devtool: 'cheap-module-source-map',
entry: {
Expand Down Expand Up @@ -52,12 +52,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
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 @@ -13,7 +13,7 @@ import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils';
import babelLoaderConfig from './babel';
import { version } from '../../../package.json';

export default function(configDir) {
export default function(configDir, quiet) {
const config = {
devtool: 'cheap-module-source-map',
entry: {
Expand Down Expand Up @@ -57,8 +57,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 @@ -12,7 +12,7 @@ import babelLoaderConfig from './babel';
import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils';
import { version } from '../../../package.json';

export default function(configDir) {
export default function(configDir, quiet) {
const config = {
devtool: 'cheap-module-source-map',
entry: {
Expand Down Expand Up @@ -51,9 +51,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 @@ -12,7 +12,7 @@ import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils';
import babelLoaderConfig from './babel';
import { version } from '../../../package.json';

export default function(configDir) {
export default function(configDir, quiet) {
const config = {
devtool: 'cheap-module-source-map',
entry: {
Expand Down Expand Up @@ -51,9 +51,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

0 comments on commit 555600f

Please sign in to comment.