MCPcopy Index your code
hub / github.com/react/create-react-app / checkRequiredFiles

Function checkRequiredFiles

packages/react-dev-utils/checkRequiredFiles.js:14–30  ·  view source on GitHub ↗
(files)

Source from the content-addressed store, hash-verified

12var chalk = require('chalk');
13
14function checkRequiredFiles(files) {
15 var currentFilePath;
16 try {
17 files.forEach(filePath => {
18 currentFilePath = filePath;
19 fs.accessSync(filePath, fs.F_OK);
20 });
21 return true;
22 } catch (err) {
23 var dirName = path.dirname(currentFilePath);
24 var fileName = path.basename(currentFilePath);
25 console.log(chalk.red('Could not find a required file.'));
26 console.log(chalk.red(' Name: ') + chalk.cyan(fileName));
27 console.log(chalk.red(' Searched in: ') + chalk.cyan(dirName));
28 return false;
29 }
30}
31
32module.exports = checkRequiredFiles;

Callers 2

start.jsFile · 0.85
build.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected