UNPKG

472 BJavaScriptView Raw
1const path = require('path');
2
3module.exports = (files, paths) => {
4 let searchPaths;
5 const destPath = paths.destPath;
6 const searchPath = paths.searchPath;
7 const cwd = paths.cwd;
8 const basePath = paths.basePath;
9 const srcPath = paths.srcPath;
10
11 if (files[destPath].searchPaths || searchPath) {
12 searchPaths = path.resolve(cwd, files[destPath].searchPaths || searchPath);
13 }
14 return (searchPaths || basePath) + path.sep + srcPath;
15};