mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-29 12:55:21 +08:00
chore: fix listing packages in metro config
This commit is contained in:
@@ -8,12 +8,15 @@ const blacklist = require('metro-config/src/defaults/blacklist');
|
|||||||
const root = path.resolve(__dirname, '..');
|
const root = path.resolve(__dirname, '..');
|
||||||
const packages = path.resolve(root, 'packages');
|
const packages = path.resolve(root, 'packages');
|
||||||
|
|
||||||
|
// List all packages under `packages/`
|
||||||
const workspaces = fs
|
const workspaces = fs
|
||||||
// List all packages under `packages/`
|
|
||||||
.readdirSync(packages)
|
.readdirSync(packages)
|
||||||
// Ignore hidden files such as .DS_Store
|
.map((p) => path.join(packages, p))
|
||||||
.filter((p) => !p.startsWith('.'))
|
.filter(
|
||||||
.map((p) => path.join(packages, p));
|
(p) =>
|
||||||
|
fs.statSync(p).isDirectory() &&
|
||||||
|
fs.existsSync(path.join(p, 'package.json'))
|
||||||
|
);
|
||||||
|
|
||||||
// Get the list of dependencies for all packages in the monorepo
|
// Get the list of dependencies for all packages in the monorepo
|
||||||
const modules = ['@expo/vector-icons']
|
const modules = ['@expo/vector-icons']
|
||||||
|
|||||||
Reference in New Issue
Block a user