2015-10-12 23:46:52 +00:00
|
|
|
// 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();
|
|
|
|
},
|
|
|
|
|
2016-03-12 18:58:55 +00:00
|
|
|
getBlacklistRE(platform) {
|
|
|
|
return blacklist(platform);
|
2015-10-12 23:46:52 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
_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, '..')];
|
|
|
|
}
|
|
|
|
},
|
|
|
|
};
|