MCPcopy Index your code
hub / github.com/danielroe/nuxt-capo

github.com/danielroe/nuxt-capo @v0.2.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.0 ↗ · + Follow
21 symbols 40 edges 11 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

capo.js for Nuxt

npm version npm downloads Github Actions Codecov

capo.js implementation for Nuxt 3

What is Capo.js

Capo.js is a small snippet that identifies ways to boost the (perceived) performance of your page, by changing the order of elements in the page's <head> section.

Features

  • ✨ validates your <head> in dev mode and when prerendering pages
  • 🔎 visualises optimal head configuration

Installation

Install and add nuxt-capo to your nuxt.config.

npx nuxi@latest module add capo
export default defineNuxtConfig({
  modules: ['nuxt-capo'],
})

Usage

That's it! You should now see debugging info and suggestions when server rendering your routes

Optimal head configuration Suggestions for head

Credits

Thanks to @rviscomi for making capo.js!

💻 Development

  • Clone this repository
  • Enable Corepack using corepack enable (use npm i -g corepack for Node.js < 16.10)
  • Install dependencies using pnpm install
  • Stub module with pnpm dev:prepare
  • Run pnpm dev to start playground in development mode

License

Made with ❤️

Published under the MIT License.

Extension points exported contracts — how you extend this code

ModuleOptions (Interface)
(no doc)
src/module.ts

Core symbols most depended-on inside this repo

visualizeWeights
called by 2
src/runtime/utils/logger.ts
visualizeWeight
called by 2
src/runtime/utils/logger.ts
truncateSource
called by 2
src/runtime/utils/logger.ts
logWeights
called by 2
src/runtime/utils/logger.ts
setup
called by 1
src/module.ts
getWeight
called by 1
src/runtime/utils/logger.ts
getHeadWeights
called by 1
src/runtime/utils/logger.ts
isMeta
called by 0
src/runtime/utils/logger.ts

Shape

Function 20
Interface 1

Languages

TypeScript100%

Modules by API surface

src/runtime/utils/logger.ts16 symbols
test/e2e.spec.ts3 symbols
src/module.ts2 symbols

For agents

$ claude mcp add nuxt-capo \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact