It appears you have a well-structured Git repository with various files, including SVG icons and HTML documents. Here's a brief overview:
This commit is contained in:
27
backend/node_modules/read-pkg-up/index.js
generated
vendored
Normal file
27
backend/node_modules/read-pkg-up/index.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
import path from 'path';
|
||||
import findUp from 'find-up';
|
||||
import {readPackageAsync, readPackageSync} from 'read-pkg';
|
||||
|
||||
export async function readPackageUpAsync(options) {
|
||||
const filePath = await findUp('package.json', options);
|
||||
if (!filePath) {
|
||||
return;
|
||||
}
|
||||
|
||||
return {
|
||||
packageJson: await readPackageAsync({...options, cwd: path.dirname(filePath)}),
|
||||
path: filePath
|
||||
};
|
||||
}
|
||||
|
||||
export function readPackageUpSync(options) {
|
||||
const filePath = findUp.sync('package.json', options);
|
||||
if (!filePath) {
|
||||
return;
|
||||
}
|
||||
|
||||
return {
|
||||
packageJson: readPackageSync({...options, cwd: path.dirname(filePath)}),
|
||||
path: filePath
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user