Skip to content

Commit 0445174

Browse files
committed
add type option for dependencies
1 parent 03362fb commit 0445174

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/downloaders/thirdparty/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ export default class ThirdpartyDownloader {
3333
const outDir = path.join(this.projectConfig.path, this.projectConfig.thirdparty.dir, dependency.name);
3434
await mkdirp(outDir);
3535

36-
if (SUPPORTED_ARCHIVES.includes(path.extname(fileName).slice(1))) {
36+
if (
37+
dependency.type === 'archive' ||
38+
SUPPORTED_ARCHIVES.includes(path.extname(fileName).slice(1))
39+
) {
3740
logger.info(`📤 Extracting "${dependency.name}" thirdparty...`);
3841

3942
await decompress(filePath, outDir, {

src/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export interface IDependency {
1818
url: string;
1919
strip?: number;
2020
filter?: string | string[];
21+
type?: 'file' | 'archive';
2122
}
2223

2324
export interface IProjectConfig {

0 commit comments

Comments
 (0)