mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 17:45:59 +00:00
5977f494fc
Reviewed By: frantic Differential Revision: D2547435 fb-gh-sync-id: 77016ee5beba854a4cb58e9ac04b91a7dd76cf3e
37 lines
879 B
JavaScript
37 lines
879 B
JavaScript
// Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
/**
|
|
* React Native CLI configuration file
|
|
*/
|
|
'use strict';
|
|
|
|
const blacklist = require('./blacklist.js');
|
|
const path = require('path');
|
|
|
|
module.exports = {
|
|
getProjectRoots() {
|
|
return this._getRoots();
|
|
},
|
|
|
|
getAssetRoots() {
|
|
return this._getRoots();
|
|
},
|
|
|
|
getBlacklistRE() {
|
|
return blacklist('');
|
|
},
|
|
|
|
_getRoots() {
|
|
// match on either path separator
|
|
if (__dirname.match(/node_modules[\/\\]react-native[\/\\]packager$/)) {
|
|
// packager is running from node_modules of another project
|
|
return [path.resolve(__dirname, '../../..')];
|
|
} else if (__dirname.match(/Pods\/React\/packager$/)) {
|
|
// packager is running from node_modules of another project
|
|
return [path.resolve(__dirname, '../../..')];
|
|
} else {
|
|
return [path.resolve(__dirname, '..')];
|
|
}
|
|
},
|
|
};
|