"use strict";(self.webpackChunkgoffee_site=self.webpackChunkgoffee_site||[]).push([[9591],{6467:(e,o,t)=>{t.r(o),t.d(o,{assets:()=>a,contentTitle:()=>s,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>l});var n=t(4848),c=t(8453);const r={title:"Contribute"},s=void 0,i={id:"contribute",title:"Contribute",description:"The framework consists of two main parts, each lives in a separate repository, the first part is the core which contains the framework core packages. the second part is cup which has the project folder structure and is responsible for gluing everything together.",source:"@site/docs/contribute.md",sourceDirName:".",slug:"/contribute",permalink:"/goffee/docs/contribute",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{title:"Contribute"},sidebar:"docsSidebar",previous:{title:"Goffee cli",permalink:"/goffee/docs/goffee"},next:{title:"Build static",permalink:"/goffee/docs/buildstatic"}},a={},l=[];function d(e){const o={code:"code",li:"li",ol:"ol",p:"p",pre:"pre",...(0,c.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(o.p,{children:["The framework consists of two main parts, each lives in a separate repository, the first part is the ",(0,n.jsx)(o.code,{children:"core"})," which contains the framework core packages. the second part is ",(0,n.jsx)(o.code,{children:"cup"})," which has the project folder structure and is responsible for gluing everything together."]}),"\n",(0,n.jsxs)(o.p,{children:["To contribute you simply need to clone these two repositories locally and create new branches from the ",(0,n.jsx)(o.code,{children:"develop"})," branch, add your changes, then open up a ",(0,n.jsx)(o.code,{children:"PR"})," to the ",(0,n.jsx)(o.code,{children:"develop"})," branch."]}),"\n",(0,n.jsx)(o.p,{children:"Here is how you can clone and set up the development workflow on your local machine:"}),"\n",(0,n.jsxs)(o.ol,{children:["\n",(0,n.jsxs)(o.li,{children:["Create the organization ",(0,n.jsx)(o.code,{children:"goffee"})," directory in your workspace, make sure the full path to it looks like below:"]}),"\n"]}),"\n",(0,n.jsx)(o.pre,{children:(0,n.jsx)(o.code,{className:"language-bash",children:"$GOPATH/src/git.smarteching.com/goffee\n"})}),"\n",(0,n.jsxs)(o.ol,{start:"2",children:["\n",(0,n.jsxs)(o.li,{children:["clone the repository ",(0,n.jsx)(o.code,{children:"core"})," inside the organization ",(0,n.jsx)(o.code,{children:"goffee"})," directory:"]}),"\n"]}),"\n",(0,n.jsx)(o.pre,{children:(0,n.jsx)(o.code,{className:"language-bash",children:"git clone git@git.smarteching.com/goffee/core.git\n"})}),"\n",(0,n.jsxs)(o.ol,{start:"3",children:["\n",(0,n.jsxs)(o.li,{children:["clone the repository ",(0,n.jsx)(o.code,{children:"cup"}),":"]}),"\n"]}),"\n",(0,n.jsx)(o.pre,{children:(0,n.jsx)(o.code,{className:"language-bash",children:"git clone git@git.smarteching.com/goffee/cup.git\n"})}),"\n",(0,n.jsxs)(o.ol,{start:"4",children:["\n",(0,n.jsxs)(o.li,{children:["cd into the project ",(0,n.jsx)(o.code,{children:"cup"})," and open up ",(0,n.jsx)(o.code,{children:"go.mod"})," in your editor and add the line ",(0,n.jsx)(o.code,{children:"git.smarteching.com/goffee/core => [full-local-path-to-core]"})," to the ",(0,n.jsx)(o.code,{children:"replace"})," statement, make sure it looks something like this:"]}),"\n"]}),"\n",(0,n.jsx)(o.pre,{children:(0,n.jsx)(o.code,{className:"language-go",children:"module git.smarteching.com/goffee/cup\n\nreplace (\ngit.smarteching.com/goffee/core => /path-to-go-workspace/core\n\ngit.smarteching.com/goffee/cup/config => ./config\ngit.smarteching.com/goffee/cup/handlers => ./handlers\ngit.smarteching.com/goffee/cup/middlewares => ./middlewares\ngit.smarteching.com/goffee/cup/models => ./models\n)\n"})}),"\n",(0,n.jsxs)(o.p,{children:["Note:\nthis is needed to tell go that instead of using the remote core package use the local copy where we will be making the changes, once you are done, open a ",(0,n.jsx)(o.code,{children:"PR"})," to ",(0,n.jsx)(o.code,{children:"develop"})," branch."]})]})}function h(e={}){const{wrapper:o}={...(0,c.R)(),...e.components};return o?(0,n.jsx)(o,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},8453:(e,o,t)=>{t.d(o,{R:()=>s,x:()=>i});var n=t(6540);const c={},r=n.createContext(c);function s(e){const o=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function i(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:s(e.components),n.createElement(r.Provider,{value:o},e.children)}}}]);