Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. var path = require('path');
  2. var fs = require('fs');
  3.  
  4. var appDirectory = fs.realpathSync(process.cwd());
  5. function resolveApp(relativePath) {
  6. return path.resolve(appDirectory, relativePath);
  7. }
  8.  
  9. var nodePaths = (process.env.NODE_PATH || '')
  10. .split(process.platform === 'win32' ? ';' : ':')
  11. .filter(Boolean)
  12. .filter(folder => !path.isAbsolute(folder))
  13. .map(resolveApp);
  14.  
  15. module.exports = {
  16. appBuild: resolveApp('build'),
  17. appPublic: resolveApp('public'),
  18. appPackageJson: resolveApp('package.json'),
  19. appSrc: resolveApp('src'),
  20. appNodeModules: resolveApp('node_modules'),
  21. nodePaths: nodePaths,
  22. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement