MCPcopy
hub / github.com/formatjs/formatjs / main

Function main

tools/check_package_exports.ts:84–100  ·  view source on GitHub ↗
(args: Args)

Source from the content-addressed store, hash-verified

82}
83
84function main(args: Args): void {
85 const pkgDir = args._[0]
86 if (!pkgDir) {
87 console.error('Usage: check_package_exports <pkg-dir>')
88 process.exit(1)
89 }
90
91 const errors = validatePackageExports(pkgDir)
92 if (errors.length > 0) {
93 for (const err of errors) {
94 console.error(`FAIL: ${err}`)
95 }
96 process.exit(1)
97 }
98
99 console.log('PASS: all package.json exports exist in package')
100}
101
102if (import.meta.filename === process.argv[1]) {
103 main(minimist<Args>(process.argv.slice(2)))

Callers 1

Calls 3

validatePackageExportsFunction · 0.85
errorMethod · 0.80
logMethod · 0.80

Tested by

no test coverage detected