Merge pull request #3487 from bmson/baldvin/verbose

Suppress verbose build output
This commit is contained in:
Filipp Riabchun 2018-04-26 02:23:55 +03:00 committed by GitHub
commit 18f65211b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 20 additions and 16 deletions

View File

@ -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',
@ -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: [
{

View File

@ -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',
@ -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: [
{

View File

@ -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',
@ -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: [
{

View File

@ -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',
@ -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: [
{

View File

@ -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',
@ -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: [
{

View File

@ -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

View File

@ -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);
@ -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 = () => {};

View File

@ -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 '/'