mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-03-11 17:23:41 +00:00
refactor: build system
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user