|  | 
| 1 |  | -# @minch/nuxt-basis | 
|  | 1 | +# Docs for Nuxt Basis | 
| 2 | 2 | 
 | 
| 3 |  | -A Base Layer for Nuxt Projects (Nuxt 4, Tailwind CSS 4, & Additional Modules). | 
|  | 3 | +@minch/nuxt-basis is a base layer for Nuxt Projects that provides a pre-configured setup with Nuxt 4, Tailwind CSS 4, and additional modules. | 
| 4 | 4 | 
 | 
| 5 |  | -## Working on the layer | 
|  | 5 | +## Features | 
| 6 | 6 | 
 | 
| 7 |  | -The `.playground` directory should help you on trying your layer during development. | 
|  | 7 | +- Pre-configured modules: | 
|  | 8 | +  - [@nuxt/eslint](https://github.com/nuxt/eslint) - ESLint integration | 
|  | 9 | +  - [@nuxt/content](https://content.nuxt.com/) - Content management | 
|  | 10 | +  - [@nuxt/image](https://image.nuxt.com/) - Image optimization | 
|  | 11 | +  - [@nuxt/test-utils](https://nuxt.com/docs/getting-started/testing) - Testing utilities | 
|  | 12 | +  - [@nuxt/ui](https://ui.nuxt.com/) - UI components | 
|  | 13 | +- Built-in TailwindCSS 4 configuration | 
|  | 14 | +- TypeScript support | 
|  | 15 | +- DevTools enabled by default | 
| 8 | 16 | 
 | 
| 9 |  | -Running `pnpm dev` will prepare and boot `.playground` directory, which imports your layer itself. | 
|  | 17 | +## Installation | 
|  | 18 | + | 
|  | 19 | +```bash | 
|  | 20 | +pnpm add -D @minch/nuxt-basis | 
|  | 21 | +``` | 
| 10 | 22 | 
 | 
| 11 | 23 | ## Usage | 
| 12 | 24 | 
 | 
| 13 |  | -```bash | 
| 14 |  | -npm install --save-dev @minch/nuxt-basis | 
|  | 25 | +1. Add the layer to your `nuxt.config.ts`: | 
|  | 26 | + | 
|  | 27 | +```ts | 
|  | 28 | +export default defineNuxtConfig({ | 
|  | 29 | +  extends: ["@minch/nuxt-basis"], | 
|  | 30 | +}); | 
| 15 | 31 | ``` | 
| 16 | 32 | 
 | 
| 17 |  | -Then add the dependency to their `extends` in `nuxt.config`: | 
|  | 33 | +2. (Optional) Configure modules in `nuxt.config.ts`: | 
| 18 | 34 | 
 | 
| 19 | 35 | ```ts | 
| 20 |  | -defineNuxtConfig({ | 
|  | 36 | +export default defineNuxtConfig({ | 
| 21 | 37 |   extends: ["@minch/nuxt-basis"], | 
|  | 38 | +  baseModules: { | 
|  | 39 | +    eslint: true, // Enable/disable ESLint module | 
|  | 40 | +    content: true, // Enable/disable Content module | 
|  | 41 | +    image: true, // Enable/disable Image module | 
|  | 42 | +    testUtils: true, // Enable/disable Test Utils module | 
|  | 43 | +    ui: true, // Enable/disable UI module | 
|  | 44 | +  }, | 
| 22 | 45 | }); | 
| 23 | 46 | ``` | 
|  | 47 | + | 
|  | 48 | +All modules are enabled by default. Set any option to `false` to disable that module. | 
|  | 49 | + | 
|  | 50 | +## TailwindCSS Integration | 
|  | 51 | + | 
|  | 52 | +This layer includes TailwindCSS by default. You can import the base styles in your project: | 
|  | 53 | + | 
|  | 54 | +```ts | 
|  | 55 | +// In your CSS file | 
|  | 56 | +@import '@minch/nuxt-basis/tailwind'; | 
|  | 57 | +``` | 
|  | 58 | + | 
|  | 59 | +## Development | 
|  | 60 | + | 
|  | 61 | +The `.playground` directory contains an example implementation of this layer. | 
|  | 62 | + | 
|  | 63 | +```bash | 
|  | 64 | +# Install dependencies | 
|  | 65 | +pnpm install | 
|  | 66 | + | 
|  | 67 | +# Develop with the playground | 
|  | 68 | +pnpm dev | 
|  | 69 | + | 
|  | 70 | +# Build the playground | 
|  | 71 | +pnpm build | 
|  | 72 | + | 
|  | 73 | +# Generate static playground | 
|  | 74 | +pnpm generate | 
|  | 75 | + | 
|  | 76 | +# Preview the build | 
|  | 77 | +pnpm preview | 
|  | 78 | +``` | 
0 commit comments