{"_id":"@dword-design/nuxt-module-builder-fork","name":"@dword-design/nuxt-module-builder-fork","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@dword-design/nuxt-module-builder-fork","version":"0.0.1","repository":{"type":"git","url":"git+https://github.com/nuxt/module-builder.git"},"description":"Complete solution for building Nuxt modules","license":"MIT","type":"module","exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"typesVersions":{"*":{"*":["./dist/*.d.mts"],"package.json":["package.json"]}},"bin":{"nuxt-build-module":"dist/cli.mjs","nuxt-module-build":"dist/cli.mjs"},"scripts":{"build":"unbuild","dev:prepare":"unbuild --stub && pnpm -r dev:prepare","example:build":"pnpm nuxt-module-build build ./example","example:stub":"pnpm nuxt-module-build build --stub ./example","lint":"eslint .","nuxt-module-build":"JITI_ESM_RESOLVE=1 jiti ./src/cli.ts","prepack":"pnpm build","release":"pnpm vitest run && pnpm build && changelogen --release && pnpm publish && git push --follow-tags","test":"pnpm vitest --coverage","test:attw":"attw --pack example && attw --pack .","test:publint":"cd example && publint","test:engines":"installed-check -d --no-workspaces","test:knip":"knip --exclude unresolved","test:types":"vue-tsc --noEmit && pnpm -r test:types"},"packageManager":"pnpm@11.5.0","dependencies":{"citty":"^0.2.2","consola":"^3.4.2","defu":"^6.1.7","jiti":"^2.7.0","magic-regexp":"^0.11.0","mkdist":"^2.4.1","mlly":"^1.8.2","pathe":"^2.0.3","pkg-types":"^2.3.1","tsconfck":"^3.1.6","unbuild":"^3.6.1","vue-sfc-transformer":"^0.2.3"},"peerDependencies":{"@nuxt/cli":"^3.35.2","typescript":"^5.9.3"},"devDependencies":{"@arethetypeswrong/cli":"^0.18.3","@nuxt/cli":"^3.35.2","@nuxt/eslint-config":"^1.15.2","@nuxt/schema":"~4.4.6","@types/node":"^24.12.4","@types/semver":"^7.7.1","@vitest/coverage-v8":"^4.1.7","changelogen":"^0.6.2","eslint":"^10.4.1","installed-check":"^10.0.1","knip":"^6.15.0","nuxt":"~4.4.6","ofetch":"^1.5.1","pkg-pr-new":"^0.0.75","publint":"^0.3.21","semver":"^7.8.1","tinyexec":"^1.2.4","typescript":"~5.9.3","vitest":"^4.1.7","vue":"^3.5.35","vue-tsc":"^3.3.3"},"engines":{"node":"^18.0.0 || >=20.0.0"},"_id":"@dword-design/nuxt-module-builder-fork@0.0.1","gitHead":"20eeca77beeac895651f5b263e45376fbdc4c49b","bugs":{"url":"https://github.com/nuxt/module-builder/issues"},"homepage":"https://github.com/nuxt/module-builder#readme","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-LPRPH+/2NzhGTCKHkDe6IFThbOjN2TD/zwkPW4vBrYCvy9rAngHHFZ+rK1SIGQWuHNyMV9AXLJXebKdOi6TECA==","shasum":"a7db26da2e372e42317f8e4112035276ad3258a2","tarball":"https://registry.npmjs.org/@dword-design/nuxt-module-builder-fork/-/nuxt-module-builder-fork-0.0.1.tgz","fileCount":13,"unpackedSize":25600,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHLvbUZEFbSjxRIc1O9PUu8CqI+zRDd4H5w9DIOzJInbAiAIHXpbBbN+ZewGmU+OQWMLo/QWBKsUz2AaSwKViPu1Iw=="}]},"_npmUser":{"name":"dword-design","email":"info@sebastianlandwehr.com"},"directories":{},"maintainers":[{"name":"dword-design","email":"info@sebastianlandwehr.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nuxt-module-builder-fork_0.0.1_1780546313333_0.919037789684034"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-04T04:11:53.125Z","0.0.1":"2026-06-04T04:11:53.509Z","modified":"2026-06-04T04:11:53.764Z"},"maintainers":[{"name":"dword-design","email":"info@sebastianlandwehr.com"}],"description":"Complete solution for building Nuxt modules","homepage":"https://github.com/nuxt/module-builder#readme","repository":{"type":"git","url":"git+https://github.com/nuxt/module-builder.git"},"bugs":{"url":"https://github.com/nuxt/module-builder/issues"},"license":"MIT","readme":"# 📦 Nuxt Module Builder\n\n[![npm version][npm-version-src]][npm-version-href]\n[![License][license-src]][license-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n<a href=\"https://volta.net/nuxt/module-builder?utm_source=nuxt_module_builder_readme\"><img src=\"https://user-images.githubusercontent.com/904724/209143798-32345f6c-3cf8-4e06-9659-f4ace4a6acde.svg\" alt=\"Volta board\"></a>\n\n> The complete solution to build and ship [Nuxt modules](https://nuxt.com/modules).\n\n## Features\n\n- Compatible with Nuxt 3 and Nuxt Kit\n- Unified build with [unjs/unbuild](https://github.com/unjs/unbuild)\n- Automated build config using last module spec\n- Typescript and ESM support\n- Auto generated types and shims for `@nuxt/schema`\n\nWe recommend to checkout the [Nuxt modules author guide](https://nuxt.com/docs/guide/going-further/modules) before starting with the module-builder.\n\n## Requirements\n\nFor a user to use a module generated from module-builder, it's recommended they have:\n- Node.js >= 18.x. _Latest Node LTS preferred_\n- Nuxt 3+.\n\n## Quick start\n\nGet started with our [module starter](https://github.com/nuxt/starter/tree/module):\n\n```bash\nnpm create nuxt -- -t module my-module\n```\n\n## Project structure\n\nThe module builder requires a special project structure. You can check out the [module template](https://github.com/nuxt/starter/tree/module).\n\n### `src/module.ts`\n\nThe entrypoint for module definition.\n\nA default export using `defineNuxtModule` and `ModuleOptions` type export is expected.\n\nYou could also optionally export `ModuleHooks` or `ModuleRuntimeHooks` to annotate any custom hooks the module uses.\n\n```ts [src/module.ts]\nimport { defineNuxtModule } from '@nuxt/kit'\n\nexport interface ModuleOptions {\n  apiKey: string\n}\n\nexport interface ModuleHooks {\n  'my-module:init': any\n}\n\nexport interface ModuleRuntimeHooks {\n  'my-module:runtime-hook': any\n}\n\nexport interface ModuleRuntimeConfig {\n  PRIVATE_NAME: string\n}\n\nexport interface ModulePublicRuntimeConfig {\n  NAME: string\n}\n\nexport default defineNuxtModule<ModuleOptions>({\n  meta: {\n    name: 'my-module',\n    configKey: 'myModule'\n  },\n  defaults: {\n    apiKey: 'test'\n  },\n  async setup (moduleOptions, nuxt) {\n    // Write module logic in setup function\n  }\n})\n```\n\n### `src/runtime/`\n\nAny runtime file and code that we need to provide by module including plugins, composables and server api, should be in this directory.\n\nEach file will be transformed individually using [unjs/mkdist](https://github.com/unjs/mkdist) to `dist/runtime/`.\n\n<!-- TODO: Docs about how to address runtime from within setup -->\n\n### `package.json`:\n\nA minimum `package.json` should look like this:\n\n```json [package.json]\n{\n  \"name\": \"my-module\",\n  \"license\": \"MIT\",\n  \"version\": \"1.0.0\",\n  \"exports\": {\n    \".\": {\n      \"types\": \"./dist/types.d.mts\",\n      \"import\": \"./dist/module.mjs\"\n    }\n  },\n  \"main\": \"./dist/module.mjs\",\n  \"typesVersions\": {\n    \"*\": {\n      \".\": [\n        \"./dist/types.d.mts\"\n      ]\n    }\n  },\n  \"files\": [\n    \"dist\"\n  ],\n  \"scripts\": {\n    \"prepack\": \"nuxt-module-build build\"\n  },\n  \"dependencies\": {\n    \"@nuxt/kit\": \"latest\"\n  },\n  \"devDependencies\": {\n    \"@nuxt/module-builder\": \"latest\"\n  }\n}\n```\n\n### `build.config.ts` (optional)\n\nModule builder is essentially a preset for [unjs/unbuild](https://github.com/unjs/unbuild), check out the [build command](./src/commands/build.ts#L51) for reference.\n\nTo customize/extend the unbuild configuration you can add a `build.config.ts` in the root of your project:\n\n```ts\nimport { defineBuildConfig } from 'unbuild'\n\nexport default defineBuildConfig({\n  // set additional configuration or customize using hooks\n})\n```\n\n## Dist files\n\nModule builder generates dist files in `dist/` directory:\n\n- `module.mjs`: Module entrypoint build from `src/module`\n- `module.json`: Module meta extracted from `module.mjs` + `package.json`\n- `types.d.mts`: Exported types in addition to shims for `nuxt.config` auto completion.\n- `runtime/*`: Individually transformed files using [unjs/mkdist](https://github.com/unjs/mkdist)\n  - Javascript and `.ts` files will be transformed to `.js` with extracted types on `.d.ts` file with same name\n  - `.vue` files will be transformed with extracted `.d.ts` file\n  - Other files will be copied as is\n\n## 💻 Development\n\n- Clone repository\n- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`\n- Install dependencies using `pnpm install`\n- Try building [example module](./example) using `pnpm example:build`\n\n## License\n\n[MIT](./LICENSE) - Made with 💚\n\n<!-- Badges -->\n[npm-version-src]: https://npmx.dev/api/registry/badge/version/@nuxt/module-builder\n[npm-version-href]: https://npmx.dev/package/@nuxt/module-builder\n\n[npm-downloads-src]: https://npmx.dev/api/registry/badge/downloads/@nuxt/module-builder\n[npm-downloads-href]: https://npm.chart.dev/@nuxt/module-builder\n\n[license-src]: https://img.shields.io/github/license/nuxt/module-builder.svg?style=flat&colorA=18181B&colorB=28CF8D\n[license-href]: https://github.com/nuxt/module-builder/blob/main/LICENSE\n","readmeFilename":"README.md","_rev":"1-c78c3e48ea59d767b68d70de87195030"}