Files
react-native-community-cli/scripts/helpers.js
Michał Pierzchała 61bc2882f5 chore: setup monorepo with Lerna (#109)
* chore: setup monorepo with lerna

* chore: move flow to root

* fix: lint

* chore: add watch command
2019-01-23 18:04:01 +01:00

17 lines
357 B
JavaScript

const fs = require('fs');
const path = require('path');
const PACKAGES_DIR = path.resolve(__dirname, '../packages');
function getPackages() {
return fs
.readdirSync(PACKAGES_DIR)
.map(file => path.resolve(PACKAGES_DIR, file))
.filter(f => fs.lstatSync(path.resolve(f)).isDirectory());
}
module.exports = {
getPackages,
PACKAGES_DIR,
};