run-dev: Suppress the notices made by third-party tools.

This limits the `run-dev.py` startup output.
And made the terminal message a bit more clear about
accessing the server.

Fixes #16846
This commit is contained in:
Ganesh Pawar 2020-12-29 15:26:28 +05:30 committed by Tim Abbott
parent 50121cce5e
commit eefa687832
2 changed files with 12 additions and 1 deletions

View File

@ -341,7 +341,7 @@ def shutdown_handler(*args: Any, **kwargs: Any) -> None:
def print_listeners() -> None: def print_listeners() -> None:
external_host = os.getenv('EXTERNAL_HOST', 'localhost') external_host = os.getenv('EXTERNAL_HOST', 'localhost')
print(f"\nStarting Zulip on {CYAN}http://{external_host}:{proxy_port}/{ENDC}. Internal ports:") print(f"\nStarting Zulip on:\n\n\t{CYAN}http://{external_host}:{proxy_port}/{ENDC}\n\nInternal ports:")
ports = [ ports = [
(proxy_port, 'Development server proxy (connect here)'), (proxy_port, 'Development server proxy (connect here)'),
(django_port, 'Django'), (django_port, 'Django'),

View File

@ -224,6 +224,16 @@ export default (_env: unknown, argv: {mode?: string}): webpack.Configuration[] =
}, },
}, },
plugins: [ plugins: [
new webpack.ProgressPlugin({
handler(percentage) {
if (percentage === 1) {
console.log(
"\u001B[34mi 「wdm」\u001B[0m:",
"Webpack compilation successful.",
);
}
},
}),
new DebugRequirePlugin(), new DebugRequirePlugin(),
new BundleTracker({ new BundleTracker({
filename: production filename: production
@ -256,6 +266,7 @@ export default (_env: unknown, argv: {mode?: string}): webpack.Configuration[] =
}, },
publicPath: "/webpack/", publicPath: "/webpack/",
stats: "errors-only", stats: "errors-only",
noInfo: true,
}, },
}; };