Skip to content

Commit

Permalink
misc: remove more unused create-react-app stuff
Browse files Browse the repository at this point in the history
Part of #10.
  • Loading branch information
mik3y committed Jan 1, 2021
1 parent fa59139 commit 5cf9f67
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 1,143 deletions.
30 changes: 0 additions & 30 deletions config/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

const fs = require('fs');
const path = require('path');
const paths = require('./paths');

// Make sure that including paths.js after env.js will read .env variables.
delete require.cache[require.resolve('./paths')];

const NODE_ENV = process.env.NODE_ENV;
if (!NODE_ENV) {
Expand All @@ -14,32 +10,6 @@ if (!NODE_ENV) {
);
}

// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
const dotenvFiles = [
`${paths.dotenv}.${NODE_ENV}.local`,
// Don't include `.env.local` for `test` environment
// since normally you expect tests to produce the same
// results for everyone
NODE_ENV !== 'test' && `${paths.dotenv}.local`,
`${paths.dotenv}.${NODE_ENV}`,
paths.dotenv,
].filter(Boolean);

// Load environment variables from .env* files. Suppress warnings using silent
// if this file is missing. dotenv will never modify any environment variables
// that have already been set. Variable expansion is supported in .env files.
// https://github.com/motdotla/dotenv
// https://github.com/motdotla/dotenv-expand
dotenvFiles.forEach(dotenvFile => {
if (fs.existsSync(dotenvFile)) {
require('dotenv-expand')(
require('dotenv').config({
path: dotenvFile,
})
);
}
});

// We support resolving modules according to `NODE_PATH`.
// This lets you use absolute paths in imports inside large monorepos:
// https://github.com/facebook/create-react-app/issues/253.
Expand Down
66 changes: 0 additions & 66 deletions config/getHttpsConfig.js

This file was deleted.

134 changes: 0 additions & 134 deletions config/modules.js

This file was deleted.

6 changes: 0 additions & 6 deletions config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,8 @@ module.exports = {
appPublic: resolveApp('public'),
appHtml: resolveApp('public/index.html'),
appIndexJs: resolveModule(resolveApp, 'src/index'),
appPackageJson: resolveApp('package.json'),
appSrc: resolveApp('src'),
appTsConfig: resolveApp('tsconfig.json'),
appJsConfig: resolveApp('jsconfig.json'),
yarnLockFile: resolveApp('yarn.lock'),
testsSetup: resolveModule(resolveApp, 'src/setupTests'),
proxySetup: resolveApp('src/setupProxy.js'),
appNodeModules: resolveApp('node_modules'),
swSrc: resolveModule(resolveApp, 'src/service-worker'),
publicUrlOrPath,
};
Expand Down
Loading

0 comments on commit 5cf9f67

Please sign in to comment.