mirror of
https://github.com/sern-handler/cli
synced 2026-06-28 02:32:20 +00:00
* chore: progress * chore: blaming regex. permalink: http://whatthecommit.com/7eaa73b94ca6e8f964d99b6f2db6e9e4 * chore: permalink: * chore: lol * chore: accidental commit permalink: http://whatthecommit.com/7c6c9323d8c243d10cd93c8bbbc55d09 * fix syntx * fix list not showing up * prety * chore: refresh lockfile * chore: progress * fix list not showing up * refactor: cleanup some mess * Update preprocessor.ts --------- Co-authored-by: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com>
18 lines
463 B
TypeScript
18 lines
463 B
TypeScript
import { readdirSync } from 'node:fs';
|
|
import { fromCwd } from './fromCwd';
|
|
import { redBright, cyanBright } from 'colorette';
|
|
|
|
export function getSern() {
|
|
let files: string[] = [];
|
|
|
|
try {
|
|
const sern = fromCwd('.sern');
|
|
files = readdirSync(sern);
|
|
} catch (error) {
|
|
console.error(`${redBright('Error:')} Could not locate ${cyanBright('.sern')} directory`);
|
|
process.exit(1);
|
|
} finally {
|
|
return files;
|
|
}
|
|
}
|