UNPKG

mili

Version:
13 lines (11 loc) 259 B
const { join, relative } = require('path') module.exports = (templatePath, root) => file => ({ ...file, targetPath: join( root, file.handlers.reduce( (p, handler) => handler.genPath(p), relative(templatePath, file.path) ) ), })