Skip to content

Commit

Permalink
Suppress verbose build output
Browse files Browse the repository at this point in the history
  • Loading branch information
bmson committed Apr 25, 2018
1 parent d9f890f commit fc74d39
Show file tree
Hide file tree
Showing 6 changed files with 16 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 @@ -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
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
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 fc74d39

Please sign in to comment.