BVB Source Codes

reactide Show resolve-rc.js Source code

Return Download reactide: download resolve-rc.js Source code - Download reactide Source code - Type:.js
  1. 'use strict';
  2.  
  3. /**
  4.  * The purpose of this module, is to find the project's .babelrc and
  5.  * use its contents to bust the babel-loader's internal cache whenever an option
  6.  * changes.
  7.  *
  8.  * @see https://github.com/babel/babel-loader/issues/62
  9.  * @see http://git.io/vLEvu
  10.  */
  11. var fs = require('fs');
  12. var path = require('path');
  13. var assign = require('object-assign');
  14. var exists = require('./helpers/exists')({});
  15. var read = require('./helpers/read')({});
  16.  
  17. var find = function find(start, rel) {
  18.   var file = path.join(start, rel);
  19.   var opts = {};
  20.   var up = '';
  21.  
  22.   if (exists(file)) {
  23.     return read(file);
  24.   }
  25.  
  26.   up = path.dirname(start);
  27.   if (up !== start) {
  28.     // Reached root
  29.     return find(up, rel);
  30.   }
  31.  
  32. };
  33.  
  34. module.exports = function(loc, rel) {
  35.   rel = rel || '.babelrc';
  36.   return find(loc, rel);
  37. };
  38.  
downloadresolve-rc.js Source code - Download reactide Source code
Related Source Codes/Software:
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
postal - 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top