MCPcopy Index your code
hub / github.com/plotly/dash / gather

Function gather

dash/extract-meta.js:161–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159 const filepaths = [];
160
161 const gather = filepath => {
162 if (ignorePattern && ignorePattern.test(filepath)) {
163 return;
164 }
165 const extension = path.extname(filepath);
166 if (['.jsx', '.js'].includes(extension)) {
167 components[cleanPath(filepath)] = parseJSX(filepath);
168 } else if (filepath.endsWith('.tsx')) {
169 try {
170 const name = /(.*)\.tsx/.exec(path.basename(filepath))[1];
171 filepaths.push(filepath);
172 names.push(name);
173 } catch (err) {
174 process.stderr.write(
175 `ERROR: Invalid component file ${filepath}: ${err}`
176 );
177 }
178 }
179 };
180
181 sources.forEach(sourcePath => {
182 if (fs.lstatSync(sourcePath).isDirectory()) {

Callers 1

gatherComponentsFunction · 0.85

Calls 5

cleanPathFunction · 0.85
parseJSXFunction · 0.85
pushMethod · 0.80
testMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…