index.ts — ui Source File
Architecture documentation for index.ts, a typescript file in the ui codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 27cad3c1_266e_e42e_f1a7_558516d0b4a2["index.ts"] 9849c29a_1b18_4915_a4e5_156d3f3ad29a["chalk"] 27cad3c1_266e_e42e_f1a7_558516d0b4a2 --> 9849c29a_1b18_4915_a4e5_156d3f3ad29a style 27cad3c1_266e_e42e_f1a7_558516d0b4a2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
#!/usr/bin/env node
import chalk from "chalk"
function getInvoker() {
const args = process.argv.slice(2)
const env = process.env
const npmExecPath = env.npm_execpath || ""
const packageName = "shadcn@latest"
if (npmExecPath.includes("pnpm")) {
return `pnpm dlx ${packageName}${args.length ? ` ${args.join(" ")}` : ""}`
} else if (npmExecPath.includes("yarn")) {
return `yarn dlx ${packageName}${args.length ? ` ${args.join(" ")}` : ""}`
} else if (npmExecPath.includes("bun")) {
return `bunx ${packageName}${args.length ? ` ${args.join(" ")}` : ""}`
} else {
return `npx ${packageName}${args.length ? ` ${args.join(" ")}` : ""}`
}
}
const main = async () => {
console.log(
chalk.yellow(
"The 'shadcn-ui' package is deprecated. Please use the 'shadcn' package instead:"
)
)
console.log("")
console.log(chalk.green(` ${getInvoker()}`))
console.log("")
console.log(
chalk.yellow("For more information, visit: https://ui.shadcn.com/docs/cli")
)
console.log("")
}
main().catch((error) => {
console.error(chalk.red("Error:"), error.message)
process.exit(1)
})
Domain
Subdomains
Functions
Dependencies
- chalk
Source
Frequently Asked Questions
What does index.ts do?
index.ts is a source file in the ui codebase, written in typescript. It belongs to the ComponentRegistry domain, Styles subdomain.
What functions are defined in index.ts?
index.ts defines 2 function(s): getInvoker, main.
What does index.ts depend on?
index.ts imports 1 module(s): chalk.
Where is index.ts in the architecture?
index.ts is located at deprecated/cli/src/index.ts (domain: ComponentRegistry, subdomain: Styles, directory: deprecated/cli/src).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free