|
| 1 | +<!-- |
| 2 | +Get your module up and running quickly. |
| 3 | +
|
| 4 | +Find and replace all on all files (CMD+SHIFT+F): |
| 5 | +- Name: My Module |
| 6 | +- Package name: my-module |
| 7 | +- Description: My new Nuxt module |
| 8 | +--> |
| 9 | + |
| 10 | +# My Module |
| 11 | + |
| 12 | +[![npm version][npm-version-src]][npm-version-href] |
| 13 | +[![npm downloads][npm-downloads-src]][npm-downloads-href] |
| 14 | +[![License][license-src]][license-href] |
| 15 | +[![Nuxt][nuxt-src]][nuxt-href] |
| 16 | + |
| 17 | +My new Nuxt module for doing amazing things. |
| 18 | + |
| 19 | +- [✨ Release Notes](/CHANGELOG.md) |
| 20 | +<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) --> |
| 21 | +<!-- - [📖 Documentation](https://example.com) --> |
| 22 | + |
| 23 | +## Features |
| 24 | + |
| 25 | +<!-- Highlight some of the features your module provide here --> |
| 26 | +- ⛰ Foo |
| 27 | +- 🚠 Bar |
| 28 | +- 🌲 Baz |
| 29 | + |
| 30 | +## Quick Setup |
| 31 | + |
| 32 | +1. Add `my-module` dependency to your project |
| 33 | + |
| 34 | +```bash |
| 35 | +# Using pnpm |
| 36 | +pnpm add -D my-module |
| 37 | + |
| 38 | +# Using yarn |
| 39 | +yarn add --dev my-module |
| 40 | + |
| 41 | +# Using npm |
| 42 | +npm install --save-dev my-module |
| 43 | +``` |
| 44 | + |
| 45 | +2. Add `my-module` to the `modules` section of `nuxt.config.ts` |
| 46 | + |
| 47 | +```js |
| 48 | +export default defineNuxtConfig({ |
| 49 | + modules: [ |
| 50 | + 'my-module' |
| 51 | + ] |
| 52 | +}) |
| 53 | +``` |
| 54 | + |
| 55 | +That's it! You can now use My Module in your Nuxt app ✨ |
| 56 | + |
| 57 | +## Development |
| 58 | + |
| 59 | +```bash |
| 60 | +# Install dependencies |
| 61 | +npm install |
| 62 | + |
| 63 | +# Generate type stubs |
| 64 | +npm run dev:prepare |
| 65 | + |
| 66 | +# Develop with the playground |
| 67 | +npm run dev |
| 68 | + |
| 69 | +# Build the playground |
| 70 | +npm run dev:build |
| 71 | + |
| 72 | +# Run ESLint |
| 73 | +npm run lint |
| 74 | + |
| 75 | +# Run Vitest |
| 76 | +npm run test |
| 77 | +npm run test:watch |
| 78 | + |
| 79 | +# Release new version |
| 80 | +npm run release |
| 81 | +``` |
| 82 | + |
| 83 | +<!-- Badges --> |
| 84 | +[npm-version-src]: https://img.shields.io/npm/v/my-module/latest.svg?style=flat&colorA=18181B&colorB=28CF8D |
| 85 | +[npm-version-href]: https://npmjs.com/package/my-module |
| 86 | + |
| 87 | +[npm-downloads-src]: https://img.shields.io/npm/dm/my-module.svg?style=flat&colorA=18181B&colorB=28CF8D |
| 88 | +[npm-downloads-href]: https://npmjs.com/package/my-module |
| 89 | + |
| 90 | +[license-src]: https://img.shields.io/npm/l/my-module.svg?style=flat&colorA=18181B&colorB=28CF8D |
| 91 | +[license-href]: https://npmjs.com/package/my-module |
| 92 | + |
| 93 | +[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js |
| 94 | +[nuxt-href]: https://nuxt.com |
0 commit comments