Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var path = require('path');
- var fs = require('fs');
- var appDirectory = fs.realpathSync(process.cwd());
- function resolveApp(relativePath) {
- return path.resolve(appDirectory, relativePath);
- }
- var nodePaths = (process.env.NODE_PATH || '')
- .split(process.platform === 'win32' ? ';' : ':')
- .filter(Boolean)
- .filter(folder => !path.isAbsolute(folder))
- .map(resolveApp);
- module.exports = {
- appBuild: resolveApp('build'),
- appPublic: resolveApp('public'),
- appPackageJson: resolveApp('package.json'),
- appSrc: resolveApp('src'),
- appNodeModules: resolveApp('node_modules'),
- nodePaths: nodePaths,
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement