{"_id":"@crbroughton/nuxt-ignore-folders","name":"@crbroughton/nuxt-ignore-folders","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@crbroughton/nuxt-ignore-folders","version":"0.0.1","description":"Ignore folders from file-based router","author":{"name":"Craig R Broughton"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/crbroughton/nuxt-ignore-folders.git"},"type":"module","exports":{".":{"types":"./dist/types.d.ts","import":"./dist/module.mjs","require":"./dist/module.cjs"}},"main":"./dist/module.cjs","types":"./dist/types.d.ts","scripts":{"prepack":"nuxt-module-build build","dev":"nuxi dev playground","dev:build":"nuxi build playground","dev:prepare":"nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground","release":"npm run prepack && npm publish --access=public","lint":"eslint .","test":"vitest run","test:watch":"vitest watch","test:types":"vue-tsc --noEmit && cd playground && vue-tsc --noEmit","changeset":"npx @changesets/cli","changeset:status":"npx @changesets/cli status --verbose","changeset:version":"npx @changesets/cli version"},"dependencies":{"@nuxt/kit":"^3.15.4","magic-regexp":"^0.8.0"},"devDependencies":{"@changesets/cli":"^2.28.1","@nuxt/devtools":"^2.1.1","@nuxt/eslint-config":"^1.1.0","@nuxt/module-builder":"^0.8.4","@nuxt/schema":"^3.15.4","@nuxt/test-utils":"^3.17.1","@types/node":"latest","eslint":"^9.21.0","nuxt":"^3.15.4","typescript":"~5.8.2","vitest":"^3.0.7","vue-tsc":"^2.2.8"},"_id":"@crbroughton/nuxt-ignore-folders@0.0.1","gitHead":"c197bf79b4b1ccd332d5534203cb67d50f9aa8ab","bugs":{"url":"https://github.com/crbroughton/nuxt-ignore-folders/issues"},"homepage":"https://github.com/crbroughton/nuxt-ignore-folders#readme","_nodeVersion":"20.12.1","_npmVersion":"10.5.0","dist":{"integrity":"sha512-c9d7j93wd224XMEPr3/zYczpzblYBwrHaYWUkxOtetLDgP8x57NmsdcELKZ/1HACsOGPqoJ5Z+7K3uRARuiuPw==","shasum":"2fe1b8a9d5d316b4462911d4d70761ae37cfc9d7","tarball":"https://registry.npmjs.org/@crbroughton/nuxt-ignore-folders/-/nuxt-ignore-folders-0.0.1.tgz","fileCount":9,"unpackedSize":6684,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCu+Jgg/nHnPSSCjmeKkJ0Ke1Spy042cnMUUETrpP9PbgIgS3TLVb5rZEgqPKVlfsSeoiaZXcc78TH55H/KFPVZYUQ="}]},"_npmUser":{"name":"crbroughton","email":"crbroughton@posteo.uk"},"directories":{},"maintainers":[{"name":"crbroughton","email":"crbroughton@posteo.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nuxt-ignore-folders_0.0.1_1741036835007_0.8346724299698438"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-03T21:20:34.626Z","0.0.1":"2025-03-03T21:20:35.221Z","modified":"2025-03-03T21:20:35.462Z"},"maintainers":[{"name":"crbroughton","email":"crbroughton@posteo.uk"}],"description":"Ignore folders from file-based router","homepage":"https://github.com/crbroughton/nuxt-ignore-folders#readme","repository":{"type":"git","url":"git+https://github.com/crbroughton/nuxt-ignore-folders.git"},"author":{"name":"Craig R Broughton"},"bugs":{"url":"https://github.com/crbroughton/nuxt-ignore-folders/issues"},"license":"MIT","readme":"# Nuxt Ignore Folders\n\nA simple Nuxt module that allows you to specify folders to ignore from the file-based routing system. By default, Nuxt's pages router includes all files in the `pages` directory, but sometimes you may want to keep other folders (like `components`, `utils`, etc.) in your pages directory without them becoming part of your routes.\n\n## Installation\n\n```bash\nnpm install @crbroughton/nuxt-ignore-folders\n```\n\n## Usage\n\nAdd the module to your `nuxt.config.ts`:\n\n```ts\nexport default defineNuxtConfig({\n  modules: [\n    '@crbroughton/nuxt-ignore-folders'\n  ],\n  \n  // Module options\n  ignoreFolders: {\n    // Specify folders to ignore (replaces defaults)\n    folders: ['composables']\n  }\n})\n```\n\n## Options\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `folders` | `string[]` | `['assets', 'components', 'composables', 'layouts', 'middleware', 'plugins', 'public', 'server', 'shared', 'utils']` | Array of folder names to ignore from file-based routing. If you specify this option, it will replace the default list. |\n\n## How it works\n\nThis module hooks into Nuxt's `pages:extend` hook to filter out pages that match your ignored folder patterns. Any page with a file path containing `/<folder>/` will be excluded from routing.\n\nFor example, if you set `folders: ['components']`, the following paths would be excluded:\n\n- `/components/Button.vue`\n- `/admin/components/Sidebar.vue`\n- `/any/path/with/components/inside.vue`\n\nBut these would still be included:\n- `/component-demos/index.vue` (not in a 'components' folder)\n- `/about/components-overview.vue` (not in a 'components' folder)\n\n## License\n\nMIT","readmeFilename":"README.md"}