@private

Resolves commonly-used paths

@param {string} cwd
@param {string} dataPath - data directory
@return {Object} absolute paths
428904
function _paths(cwd, dataPath) {
  const paths = Utils.assignWith({}, {
    root: '.',
    data: dataPath,
    cache: join(dataPath, 'cache'),
    uploads: join(dataPath, 'uploads'),
    www: './www',
    modules: './node_modules',
  }, (_, srcPath) => resolve(cwd, srcPath));

  // Ensure paths exist
  Utils.mkdirp(paths.cache);
  Utils.mkdirp(paths.uploads);
  Utils.mkdirp(paths.www);

  return paths;
}
958095
function resolve(root, args) {
  args = root.concat(Array.prototype.slice.call(args));
  return path.resolve.apply(path, args);
}
1155953
function getAbsPath(...relativePathPartsToRoot) {
    const { resolve, join } = path;

    return fs.existsSync(relativePathPartsToRoot[0])
      ? resolve(join(...relativePathPartsToRoot))
      : resolve(join(getRepoRootAbsPath(), ...relativePathPartsToRoot));
  }
257629
function getDirectoryFromBowerRc(cwd) {
    var bowerrc = path.join(cwd, '.bowerrc');

    if (!fs.existsSync(bowerrc)) {
        return '';
    }

    var bower_config = {};
    try {
        bower_config = JSON.parse(fs.readFileSync(bowerrc));
    } catch (err) {
        return '';
    }

    return bower_config.directory;
}
720969
function resolvePrefixAndFile (nonAbsoluteFilePath, prefix) {
  // prefix is not absolute
  if (path.parse(prefix).root === '') {
    return path.resolve(process.cwd(), prefix, nonAbsoluteFilePath)
  }

  // prefix is absolute
  return path.resolve(prefix, nonAbsoluteFilePath)
}
951840
function (filePath)
    {
        if (0 === filePath.indexOf(process.cwd()))
        {
            filePath = path.relative(process.cwd(), filePath);
        }

        if (0 !== filePath.indexOf("./") && 0 !== filePath.indexOf("/"))
        {
            filePath = "./" + filePath;
        }

        return filePath;
    }
645692
function resolveScriptPaths (filePath, m) {
  const toParse = [ m ]
  const lookup = {}   // key is module name, value is path

  while (toParse.length) {
    let node = toParse.pop()

    if (node.children)
      for (let n of node.children)
        toParse.push(n)

    if (!node.scripts)
      continue

    for (let entry of node.scripts) {
      let moduleName = camelcase(path.parse(entry.source).name)
      lookup[moduleName] = entry.source
      entry.module = moduleName
    }
  }

  return lookup
}
220219
function resolveBase(app) {
    const paths = [
      { name: 'base', path: path.resolve(cwd, 'node_modules/base') },
      { name: 'base-app', path: path.resolve(cwd, 'node_modules/base-app') },
      { name: 'assemble-core', path: path.resolve(cwd, 'node_modules/assemble-core') },
      { name: 'assemble', path: path.resolve(cwd, 'node_modules/assemble') },
      { name: 'generate', path: path.resolve(cwd, 'node_modules/generate') },
      { name: 'update', path: path.resolve(cwd, 'node_modules/update') },
      { name: 'verb', path: path.resolve(cwd, 'node_modules/verb') },
      { name: 'core', path: path.resolve(__dirname, '..') }
    ];

    for (const file of paths) {
      if (opts.app && file.name === opts.app && (app = resolveApp(file))) {
        return app;
      }
    }

    if (opts.app) {
      app = resolveApp({
        name: opts.app,
        path: path.resolve(cwd, 'node_modules', opts.app)
      });
    }
    return app;
  }
1340201
function(file, options) {
		file = this.absPath(file);
		var cwd = (options && options.cwd) || '';
		if (file.substring(0, cwd.length) == cwd) {
			file = file.substring(cwd.length);
			if (file.charAt(0) != '/') {
				file = '/' + file;
			}
		}

		return file;
	}
495510
function fullPath(file, base) {
  if (!path.extname(file)) file += '.js'
  base = base ? path.dirname(base) : process.cwd()
  return path.resolve(base, file)
}
1074528
function makeFilePathRelativeToCwd (file) {
  const cwd = process.cwd();
  return (file.startsWith(cwd)) ? '.' + file.substring(cwd.length) : file;
}
130360
function mkdirSync(dirPath) {
    // Get relative path to output
    const relativePath = dirPath.replace(`${CWD}${pathSep}`, '');
  	const dirs = relativePath.split(pathSep);
  	let currentDir = CWD;

    // Check if each dir exists, and if not, create it
    dirs.forEach(dir => {
      currentDir = path.resolve(currentDir, dir);
      if(!fs.existsSync(currentDir)) {
        fs.mkdirSync(currentDir);
      }
    });
  }
557741
function (filePath) {
        var name = path.relative(this.opts.cwd, filePath);

        name = path.join(path.dirname(name), path.basename(name, this.opts.extension));

        return name;
    }
524582
function resolve(path, root, resolver) {
  try {
    // Add a default value to each path part lacking a prefix.
    let nspath = path.replace(/\/(?!\.)([^\/:\(]+)(?=\/|$)/g, '/_default_:$1')
    return platformResolve(nspath, root, resolver)
  } catch (err) {
    return fallbackResolve(path, root)
  }
}
621858
function getDotAWSMobileDirPath(projectPath)
{
    return path.normalize(path.join(getAWSMobileJSDirPath(projectPath), awsmobilejsConstant.DotAWSMobileSubDirName))
}
718149
function resolveEntry() {
  const supportEntrySuffixs = ['js', 'jsx', 'ts', 'tsx']

  for (const suffix of supportEntrySuffixs) {
    const path = resolveProjectPath(`src/main.${suffix}`)
    if (fs.existsSync(path)) {
      return path
    }
  }
}
958116
static Path resolvePath(final Path base, final String... paths) {
        return Paths.get(base.toString(), paths);
    }