2018-05-08 21:21:19 +00:00
|
|
|
// @flow
|
2018-02-18 16:13:29 +00:00
|
|
|
const path = require("path");
|
|
|
|
const fs = require("fs");
|
2018-02-17 21:28:47 +00:00
|
|
|
|
|
|
|
// Make sure any symlinks in the project folder are resolved:
|
|
|
|
// https://github.com/facebookincubator/create-react-app/issues/637
|
|
|
|
const appDirectory = fs.realpathSync(process.cwd());
|
2018-02-18 16:13:29 +00:00
|
|
|
const resolveApp = (relativePath) => path.resolve(appDirectory, relativePath);
|
2018-02-17 21:28:47 +00:00
|
|
|
|
|
|
|
// config after eject: we're in ./config/
|
|
|
|
module.exports = {
|
2018-07-31 01:01:47 +00:00
|
|
|
root: appDirectory,
|
2018-02-18 16:13:29 +00:00
|
|
|
dotenv: resolveApp(".env"),
|
2018-08-10 20:15:49 +00:00
|
|
|
favicon: resolveApp("src/assets/logo/sourcecred_32.png"),
|
2018-02-18 16:13:29 +00:00
|
|
|
appBuild: resolveApp("build"),
|
2018-11-01 17:54:53 +00:00
|
|
|
appIndexJs: resolveApp("src/homepage/index.js"),
|
|
|
|
appServerSideRenderingIndexJs: resolveApp("src/homepage/server.js"),
|
2018-02-18 16:13:29 +00:00
|
|
|
appPackageJson: resolveApp("package.json"),
|
|
|
|
appSrc: resolveApp("src"),
|
|
|
|
yarnLockFile: resolveApp("yarn.lock"),
|
|
|
|
appNodeModules: resolveApp("node_modules"),
|
2018-03-19 05:43:23 +00:00
|
|
|
|
|
|
|
backendBuild: resolveApp("bin"),
|
|
|
|
// This object should have one key-value pair per entry point. For
|
|
|
|
// each key, the value should be the path to the entry point for the
|
|
|
|
// source file, and the key will be the filename of the bundled entry
|
|
|
|
// point within the build directory.
|
|
|
|
backendEntryPoints: {
|
2018-09-02 23:11:56 +00:00
|
|
|
sourcecred: resolveApp("src/cli/main.js"),
|
2018-06-29 19:12:37 +00:00
|
|
|
//
|
2018-10-19 16:04:54 +00:00
|
|
|
generateGithubGraphqlFlowTypes: resolveApp(
|
|
|
|
"src/plugins/github/bin/generateGraphqlFlowTypes.js"
|
|
|
|
),
|
2018-06-30 23:01:54 +00:00
|
|
|
fetchAndPrintGithubRepo: resolveApp(
|
|
|
|
"src/plugins/github/bin/fetchAndPrintGithubRepo.js"
|
2018-06-12 01:57:37 +00:00
|
|
|
),
|
2018-06-30 23:01:54 +00:00
|
|
|
createExampleRepo: resolveApp("src/plugins/git/bin/createExampleRepo.js"),
|
2018-03-19 05:43:23 +00:00
|
|
|
},
|
2018-02-17 21:28:47 +00:00
|
|
|
};
|