1 | import getPackageData from 'vamtiger-require';
|
2 | import { IGetDependencies, PackagePath, IStringObject, StringConstant } from './types';
|
3 |
|
4 | const { dependencies: dependenciesPath } = PackagePath;
|
5 | const { space } = StringConstant;
|
6 |
|
7 | export default function ({ path: packagePath}: IGetDependencies) {
|
8 | const currentDependenciesPath = `${packagePath}.${dependenciesPath}`;
|
9 | const dependencies = getPackageData({
|
10 | path: currentDependenciesPath
|
11 | }) as IStringObject;
|
12 | const installDependencies = Object
|
13 | .keys(dependencies)
|
14 | .map(dependency => dependency)
|
15 | .join(space);
|
16 |
|
17 | return installDependencies;
|
18 | } |
\ | No newline at end of file |