mirror of
				https://github.com/Qortal/qortal-ui.git
				synced 2025-11-04 06:37:47 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			352 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			352 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
const path = require('path')
 | 
						|
 | 
						|
const makeSourceAbsolute = (dir, tree) => {
 | 
						|
    for (const component of Object.values(tree)) {
 | 
						|
        component.source = path.join(dir, component.file)
 | 
						|
        if (component.children) {
 | 
						|
            makeSourceAbsolute(dir, component.children)
 | 
						|
        }
 | 
						|
    }
 | 
						|
    return tree
 | 
						|
}
 | 
						|
 | 
						|
module.exports = {
 | 
						|
    makeSourceAbsolute
 | 
						|
}
 |