4
1
mirror of https://github.com/Qortal/qortal-ui.git synced 2025-02-12 02:05:51 +00:00
2023-05-11 18:40:52 +02:00

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
}