You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							16 lines
						
					
					
						
							503 B
						
					
					
				
			
		
		
	
	
							16 lines
						
					
					
						
							503 B
						
					
					
				var path = require("path"); | 
						|
 | 
						|
module.exports = function(filename, projectPath, folderPath) { | 
						|
    var namespace = "Unknown"; | 
						|
    if (projectPath) { | 
						|
        namespace = path.basename(projectPath, path.extname(projectPath)); | 
						|
        if (folderPath) { | 
						|
            namespace += "." + folderPath.replace(path.dirname(projectPath), "").substring(1).replace(/[\\\/]/g, "."); | 
						|
        } | 
						|
    }        | 
						|
 | 
						|
    return { | 
						|
        namespace: namespace, | 
						|
        name: path.basename(filename, path.extname(filename)) | 
						|
    } | 
						|
}; |