This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
reValuate/node_modules/@expo/config/build/resolvePackageJson.js.map
2021-04-02 02:24:13 +03:00

1 line
1.2 KiB
Plaintext

{"version":3,"file":"resolvePackageJson.js","sourceRoot":"","sources":["../src/resolvePackageJson.ts"],"names":[],"mappings":";;AAAA,uCAAoC;AACpC,+BAA4B;AAE5B,qCAAuC;AAEvC,SAAS,UAAU,CAAC,IAAY;IAC9B,IAAI;QACF,OAAO,mBAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;KAChC;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,KAAK,CAAC;KACd;AACH,CAAC;AAED,SAAgB,sBAAsB,CAAC,WAAmB;IACxD,MAAM,eAAe,GAAG,WAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;IAC1D,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE;QAChC,MAAM,IAAI,oBAAW,CACnB,mCAAmC,eAAe,iBAAiB,EACnE,kBAAkB,CACnB,CAAC;KACH;IACD,OAAO,eAAe,CAAC;AACzB,CAAC;AATD,wDASC","sourcesContent":["import { statSync } from 'fs-extra';\nimport { join } from 'path';\n\nimport { ConfigError } from './Errors';\n\nfunction fileExists(file: string): boolean {\n try {\n return statSync(file).isFile();\n } catch (e) {\n return false;\n }\n}\n\nexport function getRootPackageJsonPath(projectRoot: string): string {\n const packageJsonPath = join(projectRoot, 'package.json');\n if (!fileExists(packageJsonPath)) {\n throw new ConfigError(\n `The expected package.json path: ${packageJsonPath} does not exist`,\n 'MODULE_NOT_FOUND'\n );\n }\n return packageJsonPath;\n}\n"]}