You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
350 B
14 lines
350 B
6 years ago
|
import fs from 'fs';
|
||
|
|
||
|
export function getKeys(p) {
|
||
|
const packageJsonFile = `${process.cwd()}/packages/${p}/package.json`;
|
||
|
const data = fs.readFileSync(packageJsonFile, 'utf-8');
|
||
|
|
||
|
const { dependencies } = JSON.parse(data);
|
||
|
|
||
|
const keys = dependencies
|
||
|
? Object.keys(dependencies).filter((d) => !/harmony/.test(d))
|
||
|
: [];
|
||
|
return keys;
|
||
|
}
|