microsoft/typespec

Public

mirrored from https://github.com/microsoft/typespecAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
copilot/fix-html-program-viewer-crash

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

eng/emitters/scripts/upload-bundled-emitter.js

18lines · modecode

1// @ts-check
2import { resolve } from "path";
3import { bundleAndUploadStandalonePackage } from "../../../packages/bundle-uploader/dist/src/index.js";
4import { repoRoot } from "../../common/scripts/helpers.js";
5
6const packageRelativePath = process.argv[2];
7if (!packageRelativePath) {
8 // eslint-disable-next-line no-console
9 console.error("Usage: node upload-bundled-emitter.js <package-path>");
10 // eslint-disable-next-line no-console
11 console.error(" e.g. node upload-bundled-emitter.js packages/http-client-csharp");
12 process.exit(1);
13}
14
15// remove leading slash if exists, then resolve to absolute path
16const packagePath = resolve(repoRoot, packageRelativePath.replace(/^\//, ""));
17
18await bundleAndUploadStandalonePackage({ packagePath });