2018-08-03 21:59:12 +00:00
|
|
|
/* eslint-disable import/no-commonjs */
|
|
|
|
|
|
|
|
const path = require('path');
|
|
|
|
const glob = require('glob-to-regexp');
|
|
|
|
const blacklist = require('metro/src/blacklist');
|
|
|
|
const pak = require('../package.json');
|
2018-10-10 20:52:38 +00:00
|
|
|
const pak2 = require('./package.json');
|
2018-08-03 21:59:12 +00:00
|
|
|
|
2018-10-17 02:58:21 +00:00
|
|
|
const dependencies = Object.keys(pak.dependencies || {});
|
2018-10-10 20:52:38 +00:00
|
|
|
const localDependencies = Object.keys(pak2.dependencies);
|
2018-08-03 21:59:12 +00:00
|
|
|
const peerDependencies = Object.keys(pak.peerDependencies);
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
getProjectRoots() {
|
|
|
|
return [__dirname, path.resolve(__dirname, '..')];
|
|
|
|
},
|
|
|
|
getProvidesModuleNodeModules() {
|
2018-10-10 20:52:38 +00:00
|
|
|
return [...dependencies, ...localDependencies, ...peerDependencies];
|
2018-08-03 21:59:12 +00:00
|
|
|
},
|
|
|
|
getBlacklistRE() {
|
|
|
|
return blacklist([glob(`${path.resolve(__dirname, '..')}/node_modules/*`)]);
|
|
|
|
},
|
|
|
|
};
|