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