Skip to content

Commit 75d96ca

Browse files
committed
First and Final commit of completed project
1 parent a197a3c commit 75d96ca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+4807
-621
lines changed

.firebase/hosting.YnVpbGQ.cache

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
asset-manifest.json,1551884970227,a97a3da05fdef6d710040f2a9da567894a6cb335e0b39c724d38ad39bb16825a
2+
favicon.ico,499162500000,eae62e993eb980ec8a25058c39d5a51feab118bd2100c4deebb2a9c158ec11f9
3+
index.html,1551884970224,4794c582a6b53a66347bc4380cbcfb17f118a836e82d218c90c4009a5af66591
4+
precache-manifest.f2f579f0f8f9711d4b3a36f240954b99.js,1551884970230,e2e6eea83a879fb0083485264c837392d8f85f398ab1e303ec7e69495f903e07
5+
service-worker.js,1551884970224,3053f195e0e697f69cb6af5bab24691e256ce8ef2d82e6d48e70b744bf2fa5ae
6+
static/css/1.22b2139c.chunk.css,1551884970341,89edd711c6b4440d0060050736c0846c88b4f69066960d2c22a1a562fd39fab8
7+
manifest.json,499162500000,a40a4294484385ec155814f7d72caf5967a19f5efcbedf7a62b2cdff07e42711
8+
static/css/2.19e5f989.chunk.css,1551884970313,dda8edb9f1e3b8de9634f3272c03b9c94922b7e0f92ca6ad340e7f62d52ed0d1
9+
static/css/1.22b2139c.chunk.css.map,1551884970321,b58cf3b9ac3248c6d97eee1c822838bb6797cbe6e4c025b180245adf077daeb6
10+
static/css/2.19e5f989.chunk.css.map,1551884970318,cab3a5632897d802ccd909d8e0121568de1c094b9ffa0385ff5ed322553a3186
11+
static/css/3.4a6f5048.chunk.css,1551884970314,cf798ebbfa2335a8fab432b297bdd95ed7dc480ace88d912abacc863eb2afa7d
12+
static/css/3.4a6f5048.chunk.css.map,1551884970319,678e856e2ea103b9544952044e74365b27d66905e5bd34dfd86c07b90b353fb2
13+
static/css/main.1c6b513e.chunk.css,1551884970317,9e333f79a4ecfe894e9510e327f04f87439e315114e2ca04e4f4efb6885c1acb
14+
static/js/1.d280ce49.chunk.js,1551884970309,283f08a5a8534e7c9189aeb555a7cc1cf695a11365a498b7546de47b13cb1ed0
15+
static/css/main.1c6b513e.chunk.css.map,1551884970316,8256a4b77429e1b6b399ad24e4bf6cf3a53e04f3cf67b209693e08a52329e1cc
16+
static/js/1.d280ce49.chunk.js.map,1551884970339,284f9ec8fc88d439aae678b8070aef3443153aba93528c5d82f7a60adfa2ca74
17+
static/js/2.d11d5a63.chunk.js,1551884970311,e21083307cdf54f7dd740d0b4c2e9be9e4411400dd8cda7b15332e49e1b15161
18+
static/js/2.d11d5a63.chunk.js.map,1551884970320,d43cf8a3c8ab88fed66c0c7a2db565d6811b6973be70a14b180d9f53b2a1296d
19+
static/js/3.82d8f28b.chunk.js.map,1551884970324,dba5e478f1d61541fdcdc9fcea443a1af44690fd9655c71b7baf1d26387559f2
20+
static/js/main.55361ad6.chunk.js,1551884970312,4f253e17d999408a21e9c5d3f7993f329fd6923767d359cb198a66384f2ba9ea
21+
static/js/runtime~main.611f7f22.js,1551884970312,c1f0aedef4b701c84d3bbc0b114214f6cc6f66816545f444374df7d662adb3bd
22+
static/js/3.82d8f28b.chunk.js,1551884970313,c68aea88e51809cf2c06c0e2005db6b4142ac8e8b7f044946a5c67947e76604b
23+
static/media/burger-logo.b8503d26.png,1551884970311,ade73f51a1f25caa87374e50d7f4f12ea8a117738a1ba7fc0c3105c581643e2d
24+
static/js/runtime~main.611f7f22.js.map,1551884970323,5a828b9aca80bbc96bd33ddbbda6739e68119b6701a142a5727cd8fe65d0c6f3
25+
static/js/main.55361ad6.chunk.js.map,1551884970322,6c5b77dd6d1b66419aec9582531876bc7a92b6db89deb5a1ffac24d5e64de6dd
26+
static/js/4.d32156cb.chunk.js,1551884970341,7c02b2fbdbd61c96521660ccf684842234cba46cb03546945a1af4ba5b17c8a8
27+
static/js/4.d32156cb.chunk.js.map,1551884970326,196a30355ef132c45a43f327c98550a6a433060016b4b50441bda0d2ac77bc58

.firebaserc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"projects": {
3+
"default": "react-my-burger-966"
4+
}
5+
}

config/env.js

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
'use strict';
2+
3+
const fs = require('fs');
4+
const path = require('path');
5+
const paths = require('./paths');
6+
7+
// Make sure that including paths.js after env.js will read .env variables.
8+
delete require.cache[require.resolve('./paths')];
9+
10+
const NODE_ENV = process.env.NODE_ENV;
11+
if (!NODE_ENV) {
12+
throw new Error(
13+
'The NODE_ENV environment variable is required but was not specified.'
14+
);
15+
}
16+
17+
// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
18+
var dotenvFiles = [
19+
`${paths.dotenv}.${NODE_ENV}.local`,
20+
`${paths.dotenv}.${NODE_ENV}`,
21+
// Don't include `.env.local` for `test` environment
22+
// since normally you expect tests to produce the same
23+
// results for everyone
24+
NODE_ENV !== 'test' && `${paths.dotenv}.local`,
25+
paths.dotenv,
26+
].filter(Boolean);
27+
28+
// Load environment variables from .env* files. Suppress warnings using silent
29+
// if this file is missing. dotenv will never modify any environment variables
30+
// that have already been set. Variable expansion is supported in .env files.
31+
// https://github.com/motdotla/dotenv
32+
// https://github.com/motdotla/dotenv-expand
33+
dotenvFiles.forEach(dotenvFile => {
34+
if (fs.existsSync(dotenvFile)) {
35+
require('dotenv-expand')(
36+
require('dotenv').config({
37+
path: dotenvFile,
38+
})
39+
);
40+
}
41+
});
42+
43+
// We support resolving modules according to `NODE_PATH`.
44+
// This lets you use absolute paths in imports inside large monorepos:
45+
// https://github.com/facebook/create-react-app/issues/253.
46+
// It works similar to `NODE_PATH` in Node itself:
47+
// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
48+
// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
49+
// Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims.
50+
// https://github.com/facebook/create-react-app/issues/1023#issuecomment-265344421
51+
// We also resolve them to make sure all tools using them work consistently.
52+
const appDirectory = fs.realpathSync(process.cwd());
53+
process.env.NODE_PATH = (process.env.NODE_PATH || '')
54+
.split(path.delimiter)
55+
.filter(folder => folder && !path.isAbsolute(folder))
56+
.map(folder => path.resolve(appDirectory, folder))
57+
.join(path.delimiter);
58+
59+
// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
60+
// injected into the application via DefinePlugin in Webpack configuration.
61+
const REACT_APP = /^REACT_APP_/i;
62+
63+
function getClientEnvironment(publicUrl) {
64+
const raw = Object.keys(process.env)
65+
.filter(key => REACT_APP.test(key))
66+
.reduce(
67+
(env, key) => {
68+
env[key] = process.env[key];
69+
return env;
70+
},
71+
{
72+
// Useful for determining whether we’re running in production mode.
73+
// Most importantly, it switches React into the correct mode.
74+
NODE_ENV: process.env.NODE_ENV || 'development',
75+
// Useful for resolving the correct path to static assets in `public`.
76+
// For example, <img src={process.env.PUBLIC_URL + '/img/logo.png'} />.
77+
// This should only be used as an escape hatch. Normally you would put
78+
// images into the `src` and `import` them in code to get their paths.
79+
PUBLIC_URL: publicUrl,
80+
}
81+
);
82+
// Stringify all values so we can feed into Webpack DefinePlugin
83+
const stringified = {
84+
'process.env': Object.keys(raw).reduce((env, key) => {
85+
env[key] = JSON.stringify(raw[key]);
86+
return env;
87+
}, {}),
88+
};
89+
90+
return { raw, stringified };
91+
}
92+
93+
module.exports = getClientEnvironment;

config/jest/cssTransform.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
'use strict';
2+
3+
// This is a custom Jest transformer turning style imports into empty objects.
4+
// http://facebook.github.io/jest/docs/en/webpack.html
5+
6+
module.exports = {
7+
process() {
8+
return 'module.exports = {};';
9+
},
10+
getCacheKey() {
11+
// The output is always the same.
12+
return 'cssTransform';
13+
},
14+
};

config/jest/fileTransform.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
'use strict';
2+
3+
const path = require('path');
4+
5+
// This is a custom Jest transformer turning file imports into filenames.
6+
// http://facebook.github.io/jest/docs/en/webpack.html
7+
8+
module.exports = {
9+
process(src, filename) {
10+
const assetFilename = JSON.stringify(path.basename(filename));
11+
12+
if (filename.match(/\.svg$/)) {
13+
return `module.exports = {
14+
__esModule: true,
15+
default: ${assetFilename},
16+
ReactComponent: (props) => ({
17+
$$typeof: Symbol.for('react.element'),
18+
type: 'svg',
19+
ref: null,
20+
key: null,
21+
props: Object.assign({}, props, {
22+
children: ${assetFilename}
23+
})
24+
}),
25+
};`;
26+
}
27+
28+
return `module.exports = ${assetFilename};`;
29+
},
30+
};

config/paths.js

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
'use strict';
2+
3+
const path = require('path');
4+
const fs = require('fs');
5+
const url = require('url');
6+
7+
// Make sure any symlinks in the project folder are resolved:
8+
// https://github.com/facebook/create-react-app/issues/637
9+
const appDirectory = fs.realpathSync(process.cwd());
10+
const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
11+
12+
const envPublicUrl = process.env.PUBLIC_URL;
13+
14+
function ensureSlash(inputPath, needsSlash) {
15+
const hasSlash = inputPath.endsWith('/');
16+
if (hasSlash && !needsSlash) {
17+
return inputPath.substr(0, inputPath.length - 1);
18+
} else if (!hasSlash && needsSlash) {
19+
return `${inputPath}/`;
20+
} else {
21+
return inputPath;
22+
}
23+
}
24+
25+
const getPublicUrl = appPackageJson =>
26+
envPublicUrl || require(appPackageJson).homepage;
27+
28+
// We use `PUBLIC_URL` environment variable or "homepage" field to infer
29+
// "public path" at which the app is served.
30+
// Webpack needs to know it to put the right <script> hrefs into HTML even in
31+
// single-page apps that may serve index.html for nested URLs like /todos/42.
32+
// We can't use a relative path in HTML because we don't want to load something
33+
// like /todos/42/static/js/bundle.7289d.js. We have to know the root.
34+
function getServedPath(appPackageJson) {
35+
const publicUrl = getPublicUrl(appPackageJson);
36+
const servedUrl =
37+
envPublicUrl || (publicUrl ? url.parse(publicUrl).pathname : '/');
38+
return ensureSlash(servedUrl, true);
39+
}
40+
41+
const moduleFileExtensions = [
42+
'web.mjs',
43+
'mjs',
44+
'web.js',
45+
'js',
46+
'web.ts',
47+
'ts',
48+
'web.tsx',
49+
'tsx',
50+
'json',
51+
'web.jsx',
52+
'jsx',
53+
];
54+
55+
// Resolve file paths in the same order as webpack
56+
const resolveModule = (resolveFn, filePath) => {
57+
const extension = moduleFileExtensions.find(extension =>
58+
fs.existsSync(resolveFn(`${filePath}.${extension}`))
59+
);
60+
61+
if (extension) {
62+
return resolveFn(`${filePath}.${extension}`);
63+
}
64+
65+
return resolveFn(`${filePath}.js`);
66+
};
67+
68+
// config after eject: we're in ./config/
69+
module.exports = {
70+
dotenv: resolveApp('.env'),
71+
appPath: resolveApp('.'),
72+
appBuild: resolveApp('build'),
73+
appPublic: resolveApp('public'),
74+
appHtml: resolveApp('public/index.html'),
75+
appIndexJs: resolveModule(resolveApp, 'src/index'),
76+
appPackageJson: resolveApp('package.json'),
77+
appSrc: resolveApp('src'),
78+
appTsConfig: resolveApp('tsconfig.json'),
79+
yarnLockFile: resolveApp('yarn.lock'),
80+
testsSetup: resolveModule(resolveApp, 'src/setupTests'),
81+
proxySetup: resolveApp('src/setupProxy.js'),
82+
appNodeModules: resolveApp('node_modules'),
83+
publicUrl: getPublicUrl(resolveApp('package.json')),
84+
servedPath: getServedPath(resolveApp('package.json')),
85+
};
86+
87+
88+
89+
module.exports.moduleFileExtensions = moduleFileExtensions;

0 commit comments

Comments
 (0)