Description
Is your proposal related to a problem?
Yes, I was checking the comments where I saw it is mentioned in TODO, to have a single place to hold dependencies instead of hard-coding the values during declaration.
no, it's not a problem just checking comments(Write your answer here.)
Describe the solution you'd like
// dependencies.js
module.exports = ['react', 'react-dom', 'react-scripts'];
//createReactApp.js
const dependencies = require('./dependencies').sort();
(Describe your proposed solution here.)
Describe alternatives you've considered
(Write your answer here.)
Additional context
// TODO: there should be a single place that holds the dependencies
const dependencies = ['react', 'react-dom', 'react-scripts'].sort();
if (dependencies.includes(appName)) {
console.error(
chalk.red(
Cannot create a project named ${chalk.green(
"${appName}" )} because a dependency with the same name exists.\n
+
Due to the way npm works, the following names are not allowed:\n\n
) +
chalk.cyan(dependencies.map(depName => ${depName}
).join('\n')) +
chalk.red('\n\nPlease choose a different project name.')
);
process.exit(1);
}
}
I thought I will give it a try, could you please take a look once you are free.
(Write your answer here.)