MCPcopy
hub / github.com/zxlie/FeHelper / getAllFiles

Function getAllFiles

gulpfile.js:219–234  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

217 return false;
218 }
219 function getAllFiles(dir) {
220 const files = fs.readdirSync(dir);
221 files.forEach(file => {
222 const fullPath = path.join(dir, file);
223 if (fs.statSync(fullPath).isDirectory()) {
224 if (file !== 'node_modules') {
225 getAllFiles(fullPath);
226 }
227 } else {
228 if (/\.(js|css|png|jpg|jpeg|gif|svg|woff2?|ttf|eot)$/i.test(file) && !shouldExcludeFile(fullPath)) {
229 const relativePath = path.relative(outputDir, fullPath);
230 allFiles.add(relativePath);
231 }
232 }
233 });
234 }
235 function findReferences(content, filePath) {
236 const fileDir = path.dirname(filePath);
237 const patterns = [

Callers 1

detectUnusedFilesFunction · 0.85

Calls 2

shouldExcludeFileFunction · 0.85
addMethod · 0.45

Tested by

no test coverage detected