mirror of
				https://github.com/fooflington/selfdefined.git
				synced 2025-10-30 21:58:32 +00:00 
			
		
		
		
	
		
			
	
	
		
			26 lines
		
	
	
		
			620 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
		
		
			
		
	
	
			26 lines
		
	
	
		
			620 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
|   | #!/usr/bin/env node
 | ||
|  | 
 | ||
|  | 'use strict'; | ||
|  | 
 | ||
|  | const lookup = require('../'); | ||
|  | 
 | ||
|  | const program = require('commander'); | ||
|  | 
 | ||
|  | program | ||
|  |   .version(require('../package.json').version) | ||
|  |   .usage('[options] <path>') | ||
|  |   .option('-c, --config <path>', 'location of a RequireJS config file for AMD') | ||
|  |   .option('-f, --filename <path>', 'file containing the dependency') | ||
|  |   .option('-d, --directory <path>', 'directory containing all files') | ||
|  |   .parse(process.argv); | ||
|  | 
 | ||
|  | const config = program.config; | ||
|  | const filename = program.filename; | ||
|  | const partial = program.args[0]; | ||
|  | 
 | ||
|  | console.log(lookup({ | ||
|  |   config: config, | ||
|  |   filename: filename, | ||
|  |   partial: partial | ||
|  | })); |