microsoft/typespec
Publicmirrored from https://github.com/microsoft/typespecAvailable
packages/bundler/src/cli.ts
13lines · modecode
| 1 | // Use bundler via cli. |
| 2 | // Todo. |
| 3 | |
| 4 | import { resolve } from "path"; |
| 5 | import { bundleTypeSpecLibrary } from "./bundler.js"; |
| 6 | |
| 7 | const name = process.argv[2]; |
| 8 | const libraryPath = resolve(`../${name}`); |
| 9 | bundleTypeSpecLibrary(libraryPath, resolve(process.cwd(), "output")).catch((e) => { |
| 10 | // eslint-disable-next-line no-console |
| 11 | console.error(e); |
| 12 | process.exit(1); |
| 13 | }); |
| 14 | |