[{"data":1,"prerenderedAt":853},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Fcommunity\u002Fcontributing":3},{"id":4,"title":5,"body":6,"description":836,"extension":837,"frontmatter":838,"heading":5,"meta":844,"navigation":846,"order":841,"path":847,"seo":848,"sitemap":849,"source":850,"stem":851,"__hash__":852},"docs\u002Fdocs\u002F5.x\u002Fcommunity\u002Fcontributing.md","Contributing",{"type":7,"value":8,"toc":813},"minimark",[9,13,65,82,87,115,118,133,247,251,427,431,434,459,462,465,469,515,519,540,544,552,714,717,733,737,757,764,776,779,783,800,804],[10,11,12],"p",{},"There are two places to contribute:",[14,15,16,52],"ol",{},[17,18,19,24,25,29,30,29,34,38,39,43,44,51],"li",{},[20,21,23],"a",{"href":22},"#kubb-core","Kubb core",": the runtime, ",[20,26,28],{"href":27},"\u002Fdocs\u002F5.x\u002Fexplanation\u002Farchitecture#ast","AST",", ",[20,31,33],{"href":32},"\u002Fdocs\u002F5.x\u002Fexplanation\u002Farchitecture#adapters","adapter",[20,35,37],{"href":36},"\u002Fdocs\u002F5.x\u002Fexplanation\u002Farchitecture#parsers","parsers",", the ",[20,40,42],{"href":41},"\u002Fdocs\u002F5.x\u002Freference\u002Fkit","authoring kit",", and built-in plugins in ",[20,45,47],{"href":46},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fkubb",[48,49,50],"code",{},"kubb-labs\u002Fkubb",".",[17,53,54,58,59,51],{},[20,55,57],{"href":56},"#kubb-plugins","Kubb plugins",": community and official plugins in the registry at ",[20,60,62],{"href":61},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fplugins",[48,63,64],{},"kubb-labs\u002Fplugins",[10,66,67,68,72,73,77,78,51],{},"First, check the open ",[20,69,71],{"href":70},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fkubb\u002Fissues","issues"," and ",[20,74,76],{"href":75},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fkubb\u002Fpulls","pull requests"," so you don't duplicate work. Say hello on ",[20,79,81],{"href":80},"https:\u002F\u002Fdiscord.gg\u002F4dQjA6vrWX","Discord",[83,84,86],"h2",{"id":85},"prerequisites","Prerequisites",[88,89,90,97,104],"ul",{},[17,91,92,96],{},[20,93,95],{"href":94},"https:\u002F\u002Fnodejs.org\u002Fen\u002Fdownload","Node.js"," 22 or later.",[17,98,99,103],{},[20,100,102],{"href":101},"https:\u002F\u002Fpnpm.io\u002Finstallation","pnpm"," 11 or later.",[17,105,106,110,111,51],{},[20,107,109],{"href":108},"https:\u002F\u002Fgit-scm.com\u002F","Git"," and, optionally, the ",[20,112,114],{"href":113},"https:\u002F\u002Fcli.github.com\u002F","GitHub CLI",[83,116,23],{"id":117},"kubb-core",[10,119,120,121,125,126,72,129,132],{},"The monorepo at ",[20,122,123],{"href":46},[48,124,50],{}," holds everything in the ",[48,127,128],{},"kubb",[48,130,131],{},"@kubb\u002F*"," packages.",[134,135,137,142,173,177,190,194,207,211,214,232,235],"steps",{"level":136},"3",[138,139,141],"h3",{"id":140},"_1-fork-and-clone","Fork and clone",[143,144,149],"pre",{"language":145,"filename":146,"code":147,"class":148},"shell","Terminal","gh repo fork kubb-labs\u002Fkubb --clone\ncd kubb","highlights",[48,150,152,165,166],{"class":151},"language-shell",[153,154,157,161],"span",{"class":155,"style":156},"line","display: inline",[153,158,160],{"style":159},"color:#6f42c1;--hls-dark:#b392f0","gh ",[153,162,164],{"style":163},"color:#24292e;--hls-dark:#e1e4e8","repo fork kubb-labs\u002Fkubb --clone","\n",[153,167,168,171],{"class":155,"style":156},[153,169,170],{"style":159},"cd ",[153,172,128],{"style":163},[138,174,176],{"id":175},"_2-install-dependencies","Install dependencies",[143,178,180],{"language":145,"filename":146,"code":179,"class":148},"pnpm install",[48,181,182],{"class":151},[153,183,184,187],{"class":155,"style":156},[153,185,186],{"style":159},"pnpm ",[153,188,189],{"style":163},"install",[138,191,193],{"id":192},"_3-create-a-branch","Create a branch",[143,195,197],{"language":145,"filename":146,"code":196,"class":148},"git checkout -b feat\u002Fyour-feature-name",[48,198,199],{"class":151},[153,200,201,204],{"class":155,"style":156},[153,202,203],{"style":159},"git ",[153,205,206],{"style":163},"checkout -b feat\u002Fyour-feature-name",[138,208,210],{"id":209},"_4-iterate","Iterate",[10,212,213],{},"Run a single package in watch mode:",[143,215,217],{"language":145,"filename":146,"code":216,"class":148},"pnpm -F @kubb\u002Fcore start",[48,218,219],{"class":151},[153,220,221,223,226,229],{"class":155,"style":156},[153,222,186],{"style":159},[153,224,225],{"style":163},"-F ",[153,227,228],{"style":163},"@",[153,230,231],{"style":163},"kubb\u002Fcore start",[10,233,234],{},"Run the test suite:",[143,236,238],{"language":145,"filename":146,"code":237,"class":148},"pnpm run test",[48,239,240],{"class":151},[153,241,242,244],{"class":155,"style":156},[153,243,186],{"style":159},[153,245,246],{"style":163},"run test",[138,248,250],{"id":249},"what-lives-where","What lives where",[252,253,254,267],"table",{},[255,256,257],"thead",{},[258,259,260,264],"tr",{},[261,262,263],"th",{},"Path",[261,265,266],{},"What lives there",[268,269,270,289,316,326,336,346,356,370,380,393,403,413],"tbody",{},[258,271,272,278],{},[273,274,275],"td",{},[48,276,277],{},"packages\u002Fcore\u002F",[273,279,280,281,284,285,288],{},"Plugin runtime, build loop, ",[48,282,283],{},"defineExtension","\u002F",[48,286,287],{},"createKubb"," API.",[258,290,291,296],{},[273,292,293],{},[48,294,295],{},"packages\u002Fkit\u002F",[273,297,298,299,302,303,29,305,29,308,311,312,315],{},"Authoring toolkit re-exported through ",[48,300,301],{},"kubb\u002Fkit",", holding ",[48,304,283],{},[48,306,307],{},"defineGenerator",[48,309,310],{},"createRenderer",", and the ",[48,313,314],{},"ast"," node builders.",[258,317,318,323],{},[273,319,320],{},[48,321,322],{},"packages\u002Fast\u002F",[273,324,325],{},"Universal AST and visitor utilities.",[258,327,328,333],{},[273,329,330],{},[48,331,332],{},"packages\u002Fadapter-oas\u002F",[273,334,335],{},"OpenAPI adapter that parses an OAS 2.0\u002F3.x spec into the AST.",[258,337,338,343],{},[273,339,340],{},[48,341,342],{},"packages\u002Fparser-ts\u002F",[273,344,345],{},"Parser that turns the AST into TypeScript and TSX source.",[258,347,348,353],{},[273,349,350],{},[48,351,352],{},"packages\u002Fparser-md\u002F",[273,354,355],{},"Parser that turns the AST into Markdown source.",[258,357,358,363],{},[273,359,360],{},[48,361,362],{},"packages\u002Fplugin-barrel\u002F",[273,364,365,366,369],{},"Barrel file plugin (",[48,367,368],{},"enforce: 'post'",").",[258,371,372,377],{},[273,373,374],{},[48,375,376],{},"packages\u002Frenderer-jsx\u002F",[273,378,379],{},"JSX renderer used by plugins that emit components.",[258,381,382,387],{},[273,383,384],{},[48,385,386],{},"packages\u002Fcli\u002F",[273,388,389,390,392],{},"The ",[48,391,128],{}," CLI entry point.",[258,394,395,400],{},[273,396,397],{},[48,398,399],{},"packages\u002Fmcp\u002F",[273,401,402],{},"MCP server runtime.",[258,404,405,410],{},[273,406,407],{},[48,408,409],{},"packages\u002Funplugin-kubb\u002F",[273,411,412],{},"Bundler integrations (Vite, webpack, Rollup, Rolldown, Rspack, esbuild, Farm, Nuxt, Astro).",[258,414,415,420],{},[273,416,417],{},[48,418,419],{},"packages\u002Fkubb\u002F",[273,421,422,423,426],{},"The meta package that re-exports ",[48,424,425],{},"defineConfig"," with sensible defaults.",[138,428,430],{"id":429},"quality-gates","Quality gates",[10,432,433],{},"Run these locally before pushing. CI runs the same commands.",[143,435,437],{"language":145,"filename":146,"code":436,"class":148},"pnpm run typecheck\npnpm run lint\npnpm run test",[48,438,439,165,446,165,453],{"class":151},[153,440,441,443],{"class":155,"style":156},[153,442,186],{"style":159},[153,444,445],{"style":163},"run typecheck",[153,447,448,450],{"class":155,"style":156},[153,449,186],{"style":159},[153,451,452],{"style":163},"run lint",[153,454,455,457],{"class":155,"style":156},[153,456,186],{"style":159},[153,458,246],{"style":163},[83,460,57],{"id":461},"kubb-plugins",[10,463,464],{},"Build a community plugin in your own repository, or propose an official one in the core monorepo.",[138,466,468],{"id":467},"build-a-community-plugin","Build a community plugin",[14,470,471,479,489,496],{},[17,472,473,474,478],{},"Follow the ",[20,475,477],{"href":476},"\u002Fdocs\u002F5.x\u002Ftutorials\u002Fcreating-plugins","Creating Your First Plugin"," guide.",[17,480,481,482,488],{},"Use ",[20,483,485],{"href":484},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fplugins\u002Ftree\u002Fmain\u002Fpackages\u002Fplugin-axios",[48,486,487],{},"@kubb\u002Fplugin-axios"," as the layout to copy.",[17,490,491,492,495],{},"Publish to npm under the ",[48,493,494],{},"kubb-plugin-*"," naming convention.",[17,497,498,499,502,503,506,507,510,511,51],{},"Add a ",[48,500,501],{},"kubb-extension.json"," and a ",[48,504,505],{},"docs\u002F"," folder with an ",[48,508,509],{},"overview.md",", then submit the package to the Kubb registry. See ",[20,512,514],{"href":513},"\u002Fdocs\u002F5.x\u002Fhow-to\u002Fpublish-a-plugin","Publish a plugin",[138,516,518],{"id":517},"propose-an-official-plugin","Propose an official plugin",[10,520,521,522,525,526,530,531,535,536,539],{},"Official plugins ship under ",[48,523,524],{},"@kubb\u002Fplugin-*",". First, ",[20,527,529],{"href":528},"https:\u002F\u002Fgithub.com\u002Fkubb-labs\u002Fplugins\u002Fissues\u002Fnew\u002Fchoose","open an issue"," on the ",[20,532,533],{"href":61},[48,534,64],{}," repo to discuss scope and naming. Once approved, scaffold the package under ",[48,537,538],{},"packages\u002Fplugin-\u003Cname>\u002F",". Follow the structure of an existing plugin.",[83,541,543],{"id":542},"testing","Testing",[10,545,546,547,551],{},"Kubb uses ",[20,548,550],{"href":549},"https:\u002F\u002Fvitest.dev\u002F","Vitest",". Place each test file next to the source file it tests.",[143,553,557],{"language":554,"filename":555,"code":556,"class":148},"typescript","resolverExample.test.ts","import { describe, expect, it } from 'vitest'\nimport { resolverExample } from '.\u002FresolverExample.ts'\n\ndescribe('resolverExample', () => {\n  it('returns a default resolver name', () => {\n    const resolver = resolverExample({})\n    expect(resolver.name).toBe('default')\n  })\n})",[48,558,560,165,593,165,609,165,611,165,632,165,653,165,673,165,704,165,709],{"class":559},"language-typescript",[153,561,562,566,570,573,575,578,580,583,586,589],{"class":155,"style":156},[153,563,565],{"style":564},"color:#d73a49;--hls-dark:#f97583","import ",[153,567,569],{"style":568},"color:#005cc5;--hls-dark:#79b8ff","{ ",[153,571,572],{"style":163},"describe",[153,574,29],{"style":564},[153,576,577],{"style":163},"expect",[153,579,29],{"style":564},[153,581,582],{"style":163},"it ",[153,584,585],{"style":568},"} ",[153,587,588],{"style":564},"from ",[153,590,592],{"style":591},"color:#032f62;--hls-dark:#9ecbff","'vitest'",[153,594,595,597,599,602,604,606],{"class":155,"style":156},[153,596,565],{"style":564},[153,598,569],{"style":568},[153,600,601],{"style":163},"resolverExample ",[153,603,585],{"style":568},[153,605,588],{"style":564},[153,607,608],{"style":591},"'.\u002FresolverExample.ts'",[153,610],{"class":155,"style":156},[153,612,613,615,618,621,623,626,629],{"class":155,"style":156},[153,614,572],{"style":159},[153,616,617],{"style":568},"(",[153,619,620],{"style":591},"'resolverExample'",[153,622,29],{"style":564},[153,624,625],{"style":568},"() ",[153,627,628],{"style":564},"=> ",[153,630,631],{"style":568},"{",[153,633,634,637,640,642,645,647,649,651],{"class":155,"style":156},[153,635,636],{"style":568},"  ",[153,638,639],{"style":159},"it",[153,641,617],{"style":568},[153,643,644],{"style":591},"'returns a default resolver name'",[153,646,29],{"style":564},[153,648,625],{"style":568},[153,650,628],{"style":564},[153,652,631],{"style":568},[153,654,655,658,661,664,667,670],{"class":155,"style":156},[153,656,657],{"style":568},"    ",[153,659,660],{"style":564},"const ",[153,662,663],{"style":163},"resolver ",[153,665,666],{"style":564},"= ",[153,668,669],{"style":159},"resolverExample",[153,671,672],{"style":568},"({})",[153,674,675,677,679,681,684,686,689,692,694,697,699,702],{"class":155,"style":156},[153,676,657],{"style":568},[153,678,577],{"style":159},[153,680,617],{"style":568},[153,682,683],{"style":163},"resolver",[153,685,51],{"style":564},[153,687,688],{"style":568},"name",[153,690,691],{"style":568},")",[153,693,51],{"style":564},[153,695,696],{"style":159},"toBe",[153,698,617],{"style":568},[153,700,701],{"style":591},"'default'",[153,703,691],{"style":568},[153,705,706],{"class":155,"style":156},[153,707,708],{"style":568},"  })",[153,710,711],{"class":155,"style":156},[153,712,713],{"style":568},"})",[10,715,716],{},"Run tests for a single package:",[143,718,720],{"language":145,"filename":146,"code":719,"class":148},"pnpm -F @kubb\u002Fcore test",[48,721,722],{"class":151},[153,723,724,726,728,730],{"class":155,"style":156},[153,725,186],{"style":159},[153,727,225],{"style":163},[153,729,228],{"style":163},[153,731,732],{"style":163},"kubb\u002Fcore test",[83,734,736],{"id":735},"commits-and-changesets","Commits and changesets",[10,738,739,740,744,745,29,748,29,751,29,754,51],{},"Follow ",[20,741,743],{"href":742},"https:\u002F\u002Fwww.conventionalcommits.org\u002F","Conventional Commits",": ",[48,746,747],{},"feat:",[48,749,750],{},"fix:",[48,752,753],{},"docs:",[48,755,756],{},"chore:",[10,758,498,759,763],{},[20,760,762],{"href":761},"https:\u002F\u002Fgithub.com\u002Fchangesets\u002Fchangesets","changeset"," for any change that ships in a published package:",[143,765,767],{"language":145,"filename":146,"code":766,"class":148},"pnpm run changeset",[48,768,769],{"class":151},[153,770,771,773],{"class":155,"style":156},[153,772,186],{"style":159},[153,774,775],{"style":163},"run changeset",[10,777,778],{},"Skip the changeset only when the change does not affect published code, such as CI, internal tests, or docs.",[83,780,782],{"id":781},"opening-a-pull-request","Opening a pull request",[14,784,785,788,794,797],{},[17,786,787],{},"Push your branch to your fork.",[17,789,790,791,51],{},"Open a pull request against ",[48,792,793],{},"main",[17,795,796],{},"Fill in the PR template and link the related issue.",[17,798,799],{},"Make sure CI is green and re-request review after each round of changes.",[83,801,803],{"id":802},"getting-help","Getting help",[10,805,806,807,810,811,51],{},"Open an ",[20,808,809],{"href":70},"issue"," or join the ",[20,812,81],{"href":80},{"title":814,"searchDepth":815,"depth":815,"links":816},"",5,[817,819,828,832,833,834,835],{"id":85,"depth":818,"text":86},2,{"id":117,"depth":818,"text":23,"children":820},[821,823,824,825,826,827],{"id":140,"depth":822,"text":141},3,{"id":175,"depth":822,"text":176},{"id":192,"depth":822,"text":193},{"id":209,"depth":822,"text":210},{"id":249,"depth":822,"text":250},{"id":429,"depth":822,"text":430},{"id":461,"depth":818,"text":57,"children":829},[830,831],{"id":467,"depth":822,"text":468},{"id":517,"depth":822,"text":518},{"id":542,"depth":818,"text":543},{"id":735,"depth":818,"text":736},{"id":781,"depth":818,"text":782},{"id":802,"depth":818,"text":803},"A concise guide to contributing to Kubb core and Kubb plugins.","md",{"layout":839,"title":5,"description":836,"outline":840,"order":841,"navigation":842},"doc",[818,822],1,{"title":5,"icon":843},"i-iconoir-git-branch",{"layout":839,"outline":845},[818,822],{"title":5,"icon":843},"\u002Fdocs\u002F5.x\u002Fcommunity\u002Fcontributing",{"title":5,"description":836},{"loc":847},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Fcommunity\u002Fcontributing.md","docs\u002F5.x\u002Fcommunity\u002Fcontributing","rEDyh5P--RP6bjZwcZRuMDvPZCiza58AshRiAbXBSLs",1792931639737]