refactor: build system

This commit is contained in:
2023-03-22 11:45:30 +01:00
parent 4df19e8c20
commit 8cb9285462
427 changed files with 3978 additions and 9810 deletions

View File

@@ -34,10 +34,10 @@ export function mapNotNil<T, S>(array: readonly T[], transform: (element: T) =>
export function cleanupEmpty<T extends object>(object: T): T {
const out = {} as T;
for (const key in object) {
const value = object[key]
const value = object[key];
// eslint-disable-next-line unicorn/no-null
if (value != null && (typeof value !== 'object' || Object.values(value).length > 0)) {
out[key] = value
out[key] = value;
}
}
return out;

View File

@@ -25,7 +25,7 @@ export function expandPathToFilesSync(sourcePath: string, accept: (fileName: str
return directory.isDirectory()
? readdirSync(fullPath).flatMap(fragment =>
expandPathToFilesSync(path.resolve(sourcePath, fragment), accept),
)
)
: [fullPath].filter(accept);
}