[{"data":1,"prerenderedAt":205},["ShallowReactive",2],{"page:\u002Fdocs\u002F5.x\u002Fintegrations\u002Ffarm":3},{"id":4,"title":5,"body":6,"description":186,"extension":187,"frontmatter":188,"heading":5,"meta":196,"navigation":198,"order":192,"path":199,"seo":200,"sitemap":201,"source":202,"stem":203,"__hash__":204},"docs\u002Fdocs\u002F5.x\u002Fintegrations\u002Ffarm.md","Generate code from your API spec with Farm",{"type":7,"value":8,"toc":179},"minimark",[9],[10,11,13,18,37,41,56,166],"steps",{"level":12},"2",[14,15,17],"h2",{"id":16},"install-kubb-and-your-output-plugins","Install Kubb and your output plugins",[19,20,21,22,27,28,32,33,36],"p",{},"Follow the ",[23,24,26],"a",{"href":25},"\u002Fdocs\u002F5.x\u002Fhow-to\u002Finstallation","installation guide"," to add Kubb and the plugins your output needs. The integration ships with ",[29,30,31],"code",{},"kubb"," as ",[29,34,35],{},"unplugin-kubb",".",[14,38,40],{"id":39},"configure-the-integration","Configure the integration",[19,42,43,44,47,48,51,52,55],{},"Import your shared ",[29,45,46],{},"kubb.config.ts"," and pass it to the integration. The ",[29,49,50],{},"config"," must be a single object, not the array or function forms ",[29,53,54],{},"defineConfig"," accepts. Run the build command of your tool to generate the files.",[57,58,63],"pre",{"language":59,"filename":60,"code":61,"class":62},"typescript","farm.config.ts","import { defineConfig } from '@farmfe\u002Fcore'\nimport kubb from 'kubb\u002Ffarm'\nimport config from '.\u002Fkubb.config'\n\nexport default defineConfig({\n  plugins: [kubb({ config })],\n})","highlights",[29,64,66,93,94,93,106,93,118,93,120,93,134,93,161],{"class":65},"language-typescript",[67,68,71,75,79,83,86,89],"span",{"class":69,"style":70},"line","display: inline",[67,72,74],{"style":73},"color:#d73a49;--hls-dark:#f97583","import ",[67,76,78],{"style":77},"color:#005cc5;--hls-dark:#79b8ff","{ ",[67,80,82],{"style":81},"color:#24292e;--hls-dark:#e1e4e8","defineConfig ",[67,84,85],{"style":77},"} ",[67,87,88],{"style":73},"from ",[67,90,92],{"style":91},"color:#032f62;--hls-dark:#9ecbff","'@farmfe\u002Fcore'","\n",[67,95,96,98,101,103],{"class":69,"style":70},[67,97,74],{"style":73},[67,99,100],{"style":81},"kubb ",[67,102,88],{"style":73},[67,104,105],{"style":91},"'kubb\u002Ffarm'",[67,107,108,110,113,115],{"class":69,"style":70},[67,109,74],{"style":73},[67,111,112],{"style":81},"config ",[67,114,88],{"style":73},[67,116,117],{"style":91},"'.\u002Fkubb.config'",[67,119],{"class":69,"style":70},[67,121,122,125,128,131],{"class":69,"style":70},[67,123,124],{"style":73},"export ",[67,126,127],{"style":73},"default ",[67,129,54],{"style":130},"color:#6f42c1;--hls-dark:#b392f0",[67,132,133],{"style":77},"({",[67,135,136,139,142,145,148,150,153,155,158],{"class":69,"style":70},[67,137,138],{"style":77},"  ",[67,140,141],{"style":77},"plugins",[67,143,144],{"style":73},": ",[67,146,147],{"style":77},"[",[67,149,31],{"style":130},[67,151,152],{"style":77},"({ ",[67,154,112],{"style":81},[67,156,157],{"style":77},"})]",[67,159,160],{"style":73},",",[67,162,163],{"class":69,"style":70},[67,164,165],{"style":77},"})",[167,168,170,171,174,175,36],"blockquote",{"as":169},"note","Bundler integrations apply fewer defaults than the CLI: no Markdown parser, no reporters, and no ",[29,172,173],{},"output.postGenerate"," commands. Use the CLI when you need them. See ",[23,176,178],{"href":177},"\u002Fdocs\u002F5.x\u002Freference\u002Fconfiguration#defaults","Defaults",{"title":180,"searchDepth":181,"depth":181,"links":182},"",5,[183,185],{"id":16,"depth":184,"text":17},2,{"id":39,"depth":184,"text":40},"Add the kubb\u002Ffarm plugin to farm.config.ts so every Farm build generates code from your API spec with the plugins in your kubb.config.ts.","md",{"layout":189,"title":5,"description":186,"outline":190,"order":192,"navigation":193},"doc",[184,191],3,12,{"title":194,"icon":195},"Farm","i-iconoir-light-bulb",{"layout":189,"outline":197},[184,191],{"title":194,"icon":195},"\u002Fdocs\u002F5.x\u002Fintegrations\u002Ffarm",{"title":5,"description":186},{"loc":199},"kubb-labs\u002Fkubb\u002Fdocs\u002F5.x\u002Fintegrations\u002Ffarm.md","docs\u002F5.x\u002Fintegrations\u002Ffarm","zlbSC7omwAerZz6Dm06n0WgbrJ53meHCPYIEvaiPVB0",1792931641119]