Skip to content

Commit 14bfa39

Browse files
authored
Simplify getInputs function (#745)
1 parent 17ffcd2 commit 14bfa39

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

src/index.ts

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,19 +85,16 @@ async function getInputs(
8585
entries?: string | string[],
8686
source?: string
8787
): Promise<string[]> {
88-
let inputs: string[] = [];
89-
let stub: any[] = [];
90-
stub
91-
.concat(
92-
entries && entries.length
93-
? entries
94-
: (source && resolveApp(source)) ||
95-
((await isDir(resolveApp('src'))) && (await jsOrTs('src/index')))
96-
)
97-
.map(file => glob(file))
98-
.forEach(input => inputs.push(input));
99-
100-
return concatAllArray(inputs);
88+
return concatAllArray(
89+
([] as any[])
90+
.concat(
91+
entries && entries.length
92+
? entries
93+
: (source && resolveApp(source)) ||
94+
((await isDir(resolveApp('src'))) && (await jsOrTs('src/index')))
95+
)
96+
.map(file => glob(file))
97+
);
10198
}
10299

103100
prog

0 commit comments

Comments
 (0)