Skip to content

Commit 291b6ba

Browse files
halfzebraEduard Kyvenko
authored and
Eduard Kyvenko
committed
style: Apply prettier
1 parent f9c320f commit 291b6ba

File tree

3 files changed

+25
-23
lines changed

3 files changed

+25
-23
lines changed

config/env.js

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,23 @@ process.env.NODE_PATH = (process.env.NODE_PATH || '')
5858
const ELM_APP = /^ELM_APP_/i;
5959

6060
function getClientEnvironment(publicUrl) {
61-
const raw = Object.keys(process.env).filter(key => ELM_APP.test(key)).reduce((
62-
env,
63-
key
64-
) => {
65-
env[key] = process.env[key];
66-
return env;
67-
}, {
68-
// Useful for determining whether we’re running in production mode.
69-
NODE_ENV: process.env.NODE_ENV || 'development',
70-
// Useful for resolving the correct path to static assets in `public`.
71-
// For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.
72-
// This should only be used as an escape hatch. Normally you would put
73-
// images into the `src` and `import` them in code to get their paths.
74-
PUBLIC_URL: publicUrl
75-
});
61+
const raw = Object.keys(process.env)
62+
.filter(key => ELM_APP.test(key))
63+
.reduce(
64+
(env, key) => {
65+
env[key] = process.env[key];
66+
return env;
67+
},
68+
{
69+
// Useful for determining whether we’re running in production mode.
70+
NODE_ENV: process.env.NODE_ENV || 'development',
71+
// Useful for resolving the correct path to static assets in `public`.
72+
// For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.
73+
// This should only be used as an escape hatch. Normally you would put
74+
// images into the `src` and `import` them in code to get their paths.
75+
PUBLIC_URL: publicUrl
76+
}
77+
);
7678
// Stringify all values so we can feed into Webpack DefinePlugin
7779
const stringified = {
7880
'process.env': Object.keys(raw).reduce((env, key) => {

config/webpack.config.prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ module.exports = {
226226
// https://github.com/facebookincubator/create-react-app/issues/2237#issuecomment-302693219
227227
navigateFallbackWhitelist: [/^(?!\/__).*/],
228228
// Don't precache sourcemaps (they're large) and build asset manifest:
229-
staticFileGlobsIgnorePatterns: [/\.map$/, /asset-manifest\.json$/],
230-
}),
229+
staticFileGlobsIgnorePatterns: [/\.map$/, /asset-manifest\.json$/]
230+
})
231231
]
232232
};

template/src/registerServiceWorker.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
const isLocalhost = Boolean(
1212
window.location.hostname === 'localhost' ||
13-
// [::1] is the IPv6 localhost address.
14-
window.location.hostname === '[::1]' ||
15-
// 127.0.0.1/8 is considered localhost for IPv4.
16-
window.location.hostname.match(
17-
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
18-
)
13+
// [::1] is the IPv6 localhost address.
14+
window.location.hostname === '[::1]' ||
15+
// 127.0.0.1/8 is considered localhost for IPv4.
16+
window.location.hostname.match(
17+
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
18+
)
1919
);
2020

2121
export default function register() {

0 commit comments

Comments
 (0)