How to use the sync function from fast-glob
Find comprehensive JavaScript fast-glob.sync code examples handpicked from public code repositorys.
GitHub: extenda/actions
60 61 62 63 64 65 66 67 68
.mockReturnValue('serviceAcc') .mockReturnValue(file); core.getBooleanInput.mockReturnValue(dryRun); fg.sync.mockReturnValue([file]); mockFs({ [file]: configFixtures.valid }); loadSecrets.mockResolvedValue(secrets);
10
28
37
+ 9 other calls in file
79 80 81 82 83 84 85 86 87 88
let fileContent = ''; const csvArray = []; // Get files list let files = fg.sync([iconsPath], options); // Do postprocessing on files if (filesFilter) { files = filesFilter(files);
2
21
1
+ 8 other calls in file
36 37 38 39 40 41 42 43 44 45 46 47
}; var Loader = function () {}; Loader.loadFiles = async function (glob) { const files = fastGlob.sync(glob); const results = await loadFiles(files); return results.filter((result) => result.data !== undefined); };
3
6
2
+ 4 other calls in file
GitHub: frogyushi/topokki
117 118 119 120 121 122 123 124 125 126
this.loadCommand(file) } } loadEvents() { for (const path of fg.sync('./events/**/*.js')) { const file = require(`.${path}`); this.loadEvent(file); } }
0
5
2
+ 14 other calls in file
145 146 147 148 149 150 151 152 153 154 155 156 157
const filter = getFilterSync(options); let matches = []; for (const task of tasks) { matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); } return matches.filter(path_ => !filter(path_)); };
0
3
0
GitHub: FRC-6390/frc-prodromoi
235 236 237 238 239 240 241 242 243
.setPackageId(androidPkgName) .write(); // Java file paths shouldn't be hard coded const javaDirectory = path.join(locations.javaSrc, manifestId.replace(/\./g, '/')); const java_files = glob.sync('**/*.java', { cwd: javaDirectory, absolute: true }).filter(f => { const contents = fs.readFileSync(f, 'utf-8'); return /extends\s+CordovaActivity/.test(contents); });
0
2
0
+ 2 other calls in file
362 363 364 365 366 367 368 369 370 371 372
function scssToScssConfig({ mode, watch }, { getTuiDirs }) { const tuiDirs = getTuiDirs(); const scssEntry = tuiDirs.reduce((acc, dir) => { if (fs.existsSync(path.join(rootDir, dir, 'global_styles'))) { fg.sync('global_styles/**/*.scss', { cwd: dir }).forEach(x => { if (x == 'global_styles/static.scss') { // already included in bundle (see tui_json_loader) return; }
0
0
0
+ 7 other calls in file
GitHub: carflynn2009/.dotfiles
14 15 16 17 18 19 20 21 22 23
) => { try { const pattern = `${path.normalize(folder).replace(/\\/g, '/')}/**/${ opts.name || '*' }${opts.extension || ''}`; const files = glob.sync(pattern, { onlyFiles: true, absolute: true, suppressErrors: true, ignore: '**/node_modules/**'
0
0
1
+ 4 other calls in file
222 223 224 225 226 227 228 229 230 231 232 233
log('Archiving releases to', cyan(ARTIFACT_FILE_NAME)); timedExecOrDie(`cd ${DEST_DIR} && tar -czf ${ARTIFACT_FILE_NAME} *`); log('Persisting AMP version number to workspace'); const [versionsFile] = fastGlob.sync( path.join(DEST_DIR, 'org-cdn/rtv/01*/version.txt') ); fs.copySync(versionsFile, '/tmp/workspace/AMP_VERSION'); });
0
0
0
fast-glob.default is the most popular function in fast-glob (115 examples)