Skip to content

Commit c91b08b

Browse files
anton-tiptyukquarryman
authored andcommitted
webpack-devserver script autoformatted
1 parent 59f0ab5 commit c91b08b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

scripts/start.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ process.env.NODE_ENV = 'development';
44
// if this file is missing. dotenv will never modify any environment variables
55
// that have already been set.
66
// https://github.com/motdotla/dotenv
7-
require('dotenv').config({silent: true});
7+
require('dotenv').config({ silent: true });
88

99
var chalk = require('chalk');
1010
var webpack = require('webpack');
@@ -58,7 +58,7 @@ function setupCompiler(host, port, protocol) {
5858
// recompiling a bundle. WebpackDevServer takes care to pause serving the
5959
// bundle, so if you refresh, it'll wait instead of serving the old one.
6060
// "invalid" is short for "bundle invalidated", it doesn't imply any errors.
61-
compiler.plugin('invalid', function() {
61+
compiler.plugin('invalid', function () {
6262
if (isInteractive) {
6363
clearConsole();
6464
}
@@ -69,7 +69,7 @@ function setupCompiler(host, port, protocol) {
6969

7070
// "done" event fires when Webpack has finished recompiling the bundle.
7171
// Whether or not you have warnings or errors, you will get this event.
72-
compiler.plugin('done', function(stats) {
72+
compiler.plugin('done', function (stats) {
7373
if (isInteractive) {
7474
clearConsole();
7575
}
@@ -127,7 +127,7 @@ function setupCompiler(host, port, protocol) {
127127
// We need to provide a custom onError function for httpProxyMiddleware.
128128
// It allows us to log custom error messages on the console.
129129
function onProxyError(proxy) {
130-
return function(err, req, res){
130+
return function (err, req, res) {
131131
var host = req.headers && req.headers.host;
132132
console.log(
133133
chalk.red('Proxy error:') + ' Could not proxy request ' + chalk.cyan(req.url) +
@@ -142,7 +142,7 @@ function onProxyError(proxy) {
142142
// And immediately send the proper error response to the client.
143143
// Otherwise, the request will eventually timeout with ERR_EMPTY_RESPONSE on the client side.
144144
if (res.writeHead && !res.headersSent) {
145-
res.writeHead(500);
145+
res.writeHead(500);
146146
}
147147
res.end('Proxy error: Could not proxy request ' + req.url + ' from ' +
148148
host + ' to ' + proxy + ' (' + err.code + ').'
@@ -153,12 +153,12 @@ function onProxyError(proxy) {
153153
function addMiddleware(devServer) {
154154
// `proxy` lets you to specify a fallback server during development.
155155
// Every unrecognized request will be forwarded to it.
156-
156+
157157
const gonebusy_env = require('../config/gonebusy_env');
158158
const proxy = gonebusy_env['middlewareProxyHost'];
159159
const token = gonebusy_env['middlewareToken'];
160160
const middlewarePath = gonebusy_env['middlewarePath'];
161-
161+
162162
devServer.use(historyApiFallback({
163163
// Paths with dots should still use the history fallback.
164164
// See https://github.com/facebookincubator/create-react-app/issues/387.
@@ -310,7 +310,7 @@ detect(DEFAULT_PORT).then(port => {
310310
var question =
311311
chalk.yellow('Something is already running on port ' + DEFAULT_PORT + '.' +
312312
((existingProcess) ? ' Probably:\n ' + existingProcess : '')) +
313-
'\n\nWould you like to run the app on another port instead?';
313+
'\n\nWould you like to run the app on another port instead?';
314314

315315
prompt(question, true).then(shouldChangePort => {
316316
if (shouldChangePort) {

0 commit comments

Comments
 (0)