This repository has been archived by the owner on Jan 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,23 @@ | ||
import { AppContext } from "lib/util/app-context" | ||
import packageJson from "./../../package.json" | ||
import cliPackageJson from "./../../package.json" | ||
import frontendPackageJson from "dev-server-frontend/package.json" | ||
|
||
export const versionCmd = async (ctx: AppContext, args: any) => { | ||
console.log(`tsci v${packageJson.version}`) | ||
const tscircuitPackageJson = await import( | ||
"tscircuit/package.json" as any | ||
).catch((e) => ({ version: "" })) | ||
const reactFiberPackageJson = await import( | ||
"@tscircuit/react-fiber/package.json" | ||
).catch((e) => ({ version: "" })) | ||
if (tscircuitPackageJson.version) { | ||
console.log(`tscircuit@${cliPackageJson.version}`) | ||
} | ||
console.log(`@tscircuit/cli@${cliPackageJson.version}`) | ||
console.log(`@tscircuit/react-fiber@${reactFiberPackageJson.version}`) | ||
console.log( | ||
`@tscircuit/schematic-viewer@${frontendPackageJson.dependencies["@tscircuit/schematic-viewer"]}` | ||
) | ||
console.log( | ||
`@tscircuit/pcb-viewer@${frontendPackageJson.dependencies["@tscircuit/pcb-viewer"]}` | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters