rwsdk-tools
Version:
A collection of utility tools for working with the RWSDK (Redwood SDK)
49 lines (35 loc) • 1.01 kB
Markdown
1. Check to see if tailwind has already been installed on the project. (It would have installed the packages `tailwindcss @tailwindcss/vite`). If not, run the command to install Tailwind for me.
```
npx rwsdk-tools tailwind
```
2. Install shadcn cli. If the shadcn package is not installed, run the command for me.
```
pnpm dlx shadcn@latest init -y
```
3. Add a `baseUrl` to my `tsconfig.json` file (inside the `compilerOptions` section)
```
{
"compilerOptions": {
"baseUrl": ".",
}
}
4. Add resolve alias config to vite.config.ts:
```ts
import path from "path"
export default defineConfig({
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
},
},
})
```
5. Now, the user should be able to add components. console.log a message to let them know they can add components in bulk by running:
```
pnpm dlx shadcn add
```
Or a single component:
```
pnpm dlx shadcn add <COMPONENT-NAME>
```
Components will be added to the `src/components/ui` folder.