microsoft/typespec

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
copilot/fix-8260-3

Branches

Tags

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

Clone

HTTPS

Download ZIP

packages/compiler/scripts/dogfood.js

13lines · modecode

1// @ts-check
2import { run, xplatCmd } from "@typespec/internal-build-utils";
3import { readFileSync } from "fs";
4import { dirname, resolve } from "path";
5import { fileURLToPath } from "url";
6
7const pkgRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
8const version = JSON.parse(readFileSync(resolve(pkgRoot, "package.json"), "utf-8")).version;
9
10console.log("Packing...");
11await run(xplatCmd("npm"), ["pack"]);
12console.log("Installing...");
13await run(xplatCmd("npm"), ["install", "-g", `typespec-compiler-${version}.tgz`]);
14