feat: 提交资源
This commit is contained in:
		
							
								
								
									
										31
									
								
								extensions/max-studio/source/hotupdate/cli.ts
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										31
									
								
								extensions/max-studio/source/hotupdate/cli.ts
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,31 @@
 | 
			
		||||
import { generator, GenPackageConfig } from "./version_generator";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
let configs:GenPackageConfig[] = []
 | 
			
		||||
let assetRootDirPath:string = ''
 | 
			
		||||
let outputPath: string = '';
 | 
			
		||||
 | 
			
		||||
let i = 2;
 | 
			
		||||
while (i < process.argv.length) {
 | 
			
		||||
    let arg = process.argv[i];
 | 
			
		||||
    switch(arg) {
 | 
			
		||||
        case '-configPath':
 | 
			
		||||
            configs = require(process.argv[i + 1]) as GenPackageConfig[];
 | 
			
		||||
            break;
 | 
			
		||||
        case '-assetRootDirPath':
 | 
			
		||||
            assetRootDirPath = process.argv[i + 1];
 | 
			
		||||
            break;
 | 
			
		||||
        case '-outputDirPath':
 | 
			
		||||
            outputPath = process.argv[i + 1];
 | 
			
		||||
            break;
 | 
			
		||||
        default:
 | 
			
		||||
            console.error('unknown arg:', arg);
 | 
			
		||||
            break;
 | 
			
		||||
    }
 | 
			
		||||
    i += 2
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for (let item of configs) {
 | 
			
		||||
    let src = assetRootDirPath;
 | 
			
		||||
    generator(src, outputPath, item);
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user