formulaNames top-level property
Implementation
final FigGenerator formulaNames = FigGenerator(
script: [
'bash',
'-c',
'grep -A5 --include=*.ts --exclude-dir=node_modules -r \'addFormula\\|addSyncTable\\|makeFormula\\|makeSyncTable\' . | grep -A3 -i formula | grep name: | grep -oE "[\'\\"]\\w*[\'\\"]"',
],
postProcess: (String output, [List<String>? tokens]) {
if (output.trim().isEmpty) {
return [];
}
return output.split('\n').map((formulaName) {
return FigSuggestion(
name: formulaName.replaceAll(RegExp("['\"]"), '').trim(),
description: 'Execute $formulaName',
);
}).toList();
},
);