1"use strict";(self.webpackChunkmeshtastic=self.webpackChunkmeshtastic||[]).push([["2713"],{25572(e,t,s){s.r(t),s.d(t,{metadata:()=>i,default:()=>h,frontMatter:()=>l,contentTitle:()=>o,toc:()=>c,assets:()=>a});var i=JSON.parse('{"id":"development/documentation/local-dev","title":"Serving Docs Locally for Development","description":"Prerequisites","source":"@site/versioned_docs/version-2.7/development/documentation/local-dev.mdx","sourceDirName":"development/documentation","slug":"/development/documentation/local-dev","permalink":"/docs/2.7/development/documentation/local-dev","draft":false,"unlisted":false,"tags":[],"version":"2.7","lastUpdatedBy":"rcarteraz","sidebarPosition":2,"frontMatter":{"id":"local-dev","title":"Serving Docs Locally for Development","sidebar_label":"Local Development","sidebar_position":2},"sidebar":"Sidebar","previous":{"title":"Config Pages","permalink":"/docs/2.7/development/documentation/style-guides/config-pages"},"next":{"title":"Translate","permalink":"/docs/2.7/development/documentation/translate-docs"}}'),n=s(91987),r=s(67008);let l={id:"local-dev",title:"Serving Docs Locally for Development",sidebar_label:"Local Development",sidebar_position:2},o,a={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Getting Started",id:"getting-started",level:2},{value:"Fork the Meshtastic Repository",id:"fork-the-meshtastic-repository",level:3},{value:"Clone your Meshtastic Repository fork",id:"clone-your-meshtastic-repository-fork",level:3},{value:"Change directory into your Local Copy",id:"change-directory-into-your-local-copy",level:3},{value:"Install Submodules",id:"install-submodules",level:3},{value:"Install Dependencies",id:"install-dependencies",level:3},{value:"Run Development Server",id:"run-development-server",level:3},{value:"Update Local Repository",id:"update-local-repository",level:2},{value:"Verify Upstream Remote is Set",id:"verify-upstream-remote-is-set",level:3},{value:"Update/Set Upstream if it isn't configured properly",id:"updateset-upstream-if-it-isnt-configured-properly",level:4},{value:"Align with meshtastic/meshtastic Master branch",id:"align-with-meshtasticmeshtastic-master-branch",level:3}];function d(e){let t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,n.jsx)(t.p,{children:"In order to set up your local environment, you will need to install:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://github.com/nvm-sh/nvm",children:"Node Version Manager"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://pnpm.io",children:"PNPM Package Manager"})}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"getting-started",children:"Getting Started"}),"\n",(0,n.jsx)(t.h3,{id:"fork-the-meshtastic-repository",children:"Fork the Meshtastic Repository"}),"\n",(0,n.jsxs)(t.p,{children:["Log into GitHub and create a fork of the ",(0,n.jsx)(t.a,{href:"https://github.com/meshtastic/meshtastic",children:"meshtastic/meshtastic"})," repository."]}),"\n",(0,n.jsx)(t.h3,{id:"clone-your-meshtastic-repository-fork",children:"Clone your Meshtastic Repository fork"}),"\n",(0,n.jsx)(t.admonition,{type:"note",children:(0,n.jsxs)(t.p,{children:["Replace ",(0,n.jsx)(t.code,{children:"YOUR_GITHUB_USERNAME"})," with your GitHub username."]})}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-shell",metastring:'title="Clone your Fork of the Documentation Repository"',children:"git clone https://github.com/YOUR_GITHUB_USERNAME/meshtastic.git\n"})}),"\n",(0,n.jsx)(t.h3,{id:"change-directory-into-your-local-copy",children:"Change directory into your Local Copy"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-shell",metastring:'title="Change Directory"',children:"cd ./meshtastic\n"})}),"\n",(0,n.jsx)(t.h3,{id:"install-submodules",children:"Install Submodules"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-shell",metastring:'title="Install Submodules"',children:"git submodule update --init --recursive\n"})}),"\n",(0,n.jsx)(t.h3,{id:"install-dependencies",children:"Install Dependencies"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-shell",metastring:'title="Install Node.js using NVM"',children:"nvm install && nvm use\n"})}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-shell",metastring:'title="Install dependencies using pnpm"',children:"pnpm i\n"})}),"\n",(0,n.jsx)(t.h3,{id:"run-development-server",children:"Run Development Server"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-shell",metastring:'title="Run node.js server"',children:"pnpm start\n"})}),"\n",(0,n.jsxs)(t.admonition,{type:"tip",children:[(0,n.jsx)(t.p,{children:"Before submitting a pull request, it's helpful to run the following command to ensure there are no broken links or errors:"}),(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-shell",metastring:'title="Build Project"',children:"pnpm build\n"})})]}),"\n",(0,n.jsx)(t.h2,{id:"update-local-repository",children:"Update Local Repository"}),"\n",(0,n.jsx)(t.h3,{id:"verify-upstream-remote-is-set",children:"Verify Upstream Remote is Set"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-shell",metastring:'title="Check Remote and Upstream Repositories"',children:"git remote -v\n"})}),"\n",(0,n.jsxs)(t.p,{children:["If it's set, skip to ",(0,n.jsx)(t.a,{href:"#align-with-meshtasticmeshtastic-master-branch",children:"Align with meshtastic/meshtastic Master branch"})]}),"\n",(0,n.jsx)(t.h4,{id:"updateset-upstream-if-it-isnt-configured-properly",children:"Update/Set Upstream if it isn't configured properly"}),"\n",(0,n.jsx)(t.p,{children:"If upstream exists, set the URL:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-shell",metastring:'title="Update Upstream Repository"',children:"git remote set-url upstream https://github.com/meshtastic/meshtastic.git\n"})}),"\n",(0,n.jsx)(t.p,{children:"If upstream doesn't exist, add the URL:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-shell",metastring:'title="Add Upstream Repository"',children:"git remote add upstream https://github.com/meshtastic/meshtastic.git\n"})}),"\n",(0,n.jsx)(t.h3,{id:"align-with-meshtasticmeshtastic-master-branch",children:"Align with meshtastic/meshtastic Master branch"}),"\n",(0,n.jsx)(t.admonition,{type:"caution",children:(0,n.jsx)(t.p,{children:"This will delete any unfinished work. Make sure that you've saved and committed any work you wish to push up to your fork."})}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsxs)(t.p,{children:["The following command assumes the clone of your Meshtastic fork is in the home directory (",(0,n.jsx)(t.code,{children:"~/meshtastic"}),"). Adjust the path to the correct path on your machine."]})}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-shell",metastring:'title="Rebase local Meshtastic to remote Meshtastic"',children:"cd ~/meshtastic ; git fetch upstream ; git checkout master ; git rebase upstream/master\n"})})]})}function h(e={}){let{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},67008(e,t,s){s.d(t,{R:()=>l,x:()=>o});var i=s(71763);let n={},r=i.createContext(n);function l(e){let t=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:l(e.components),i.createElement(r.Provider,{value:t},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.