forked from Qortal/qortal-ui
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
352 B
16 lines
352 B
3 years ago
|
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
|
||
|
}
|