Ramu Narasingaramunarasinga.hashnode.dev·Aug 7, 2024Comparing the copyToClipboard implementations in Shadcn-ui/ui and Codehike.In this article, we will compare the Copy button code between Shadcn-ui/ui and Codehike. copyToClipboard in Shadcn-ui/ui The code snippet below is picked from shadcn-ui source code. export async function copyToClipboardWithMeta(value: string, event?:...Discusscodehike
Ramu Narasingaramunarasinga.hashnode.dev·Jul 19, 2024shadcn-ui/ui codebase analysis: How does shadcn-ui CLI work? — Part 3.1I wanted to find out how shadcn-ui CLI works. In this article, I discuss the code used to build the shadcn-ui/ui CLI. In part 3.0, I discussed how npx shadcn-ui add <component> command is registered. We will look at few more lines of code from packag...DiscussJavaScript
Ramu Narasingaramunarasinga.hashnode.dev·Jul 17, 2024shadcn-ui/ui codebase analysis: How does shadcn-ui CLI work? — Part 2.15I wanted to find out how shadcn-ui CLI works. In this article, I discuss the code used to build the shadcn-ui/ui CLI. In part 2.11, we looked at runInit function and how shadcn-ui/ui ensures directories provided in resolvedPaths in config exist. The ...DiscussTypeScript
Ramu Narasingaramunarasinga.hashnode.dev·Jul 16, 2024shadcn-ui/ui codebase analysis: How does shadcn-ui CLI work? — Part 2.14I wanted to find out how shadcn-ui CLI works. In this article, I discuss the code used to build the shadcn-ui/ui CLI. In part 2.11, we looked at runInit function and how shadcn-ui/ui ensures directories provided in resolvedPaths in config exist. The ...DiscussJavaScript
Ramu Narasingaramunarasinga.hashnode.dev·Jul 15, 2024shadcn-ui/ui codebase analysis: How does shadcn-ui CLI work? — Part 2.13I wanted to find out how shadcn-ui CLI works. In this article, I discuss the code used to build the shadcn-ui/ui CLI. In part 2.11, we looked at runInit function and how shadcn-ui/ui ensures directories provided in resolvedPaths in config exist. The ...DiscussJavaScript
Ramu Narasingaramunarasinga.hashnode.dev·Jul 12, 2024shadcn-ui/ui codebase analysis: How does shadcn-ui CLI work? — Part 2.12I wanted to find out how shadcn-ui CLI works. In this article, I discuss the code used to build the shadcn-ui/ui CLI. In part 2.11, we looked at runInit function and how shadcn-ui/ui ensures directories provided in resolvedPaths in config exist. The ...DiscussJavaScript
Ramu Narasingaramunarasinga.hashnode.dev·Jul 11, 2024shadcn-ui/ui codebase analysis: How does shadcn-ui CLI work? — Part 2.11I wanted to find out how shadcn-ui CLI works. In this article, I discuss the code used to build the shadcn-ui/ui CLI. In part 2.10, we looked at getRegistryBaseColors function, prompts, creating components.json and resolveConfigPaths. Now that we un...DiscussOpen Source
Ramu Narasingaramunarasinga.hashnode.dev·Jul 10, 2024shadcn-ui/ui codebase analysis: How does shadcn-ui CLI work? — Part 2.10I wanted to find out how shadcn-ui CLI works. In this article, I discuss the code used to build the shadcn-ui/ui CLI. In part 2.9, we looked at getRegistryStyles function, fetchRegistry function and stylesSchema. In this article, we will understand t...DiscussJavaScript
Ramu Narasingaramunarasinga.hashnode.dev·Jul 9, 2024shadcn-ui/ui codebase analysis: How does shadcn-ui CLI work? — Part 2.9I wanted to find out how shadcn-ui CLI works. In this article, I discuss the code used to build the shadcn-ui/ui CLI. In part 2.8, we looked at function promptForMinimalConfig and its parameters and how the shadcn-ui CLI uses chalk to highlight text ...DiscussJavaScript
Ramu Narasingaramunarasinga.hashnode.dev·Jul 8, 2024shadcn-ui/ui codebase analysis: How does shadcn-ui CLI work? — Part 2.8I wanted to find out how shadcn-ui CLI works. In this article, I discuss the code used to build the shadcn-ui/ui CLI. In part 2.7, we looked at function isTypescriptProject this function checks if the cwd (current working directory) has a tsconfig.js...DiscussJavaScript