mirror of
https://github.com/tiktok/sparo.git
synced 2024-12-03 04:16:54 -05:00
1 line
9 KiB
JavaScript
1 line
9 KiB
JavaScript
|
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[421],{9917:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>t,metadata:()=>l,toc:()=>a});var o=s(678),n=s(4738);const t={title:"Getting Started"},i=void 0,l={id:"pages/guide/getting_started",title:"Getting Started",description:"Everyday workflow",source:"@site/docs/pages/guide/getting_started.md",sourceDirName:"pages/guide",slug:"/pages/guide/getting_started",permalink:"/sparo/pages/guide/getting_started",draft:!1,unlisted:!1,editUrl:"https://github.com/tiktok/sparo/tree/main/apps/website/docs/pages/guide/getting_started.md",tags:[],version:"current",frontMatter:{title:"Getting Started"},sidebar:"docsSidebar",previous:{title:"Overview",permalink:"/sparo/"},next:{title:"Sparo profiles",permalink:"/sparo/pages/guide/sparo_profiles"}},c={},a=[{value:"Everyday workflow",id:"everyday-workflow",level:2},{value:"Step 1: Upgrade Git",id:"step-1-upgrade-git",level:3},{value:"Step 2: Clone your Rush monorepo",id:"step-2-clone-your-rush-monorepo",level:3},{value:"Step 3: Create a sparse profile",id:"step-3-create-a-sparse-profile",level:3},{value:"Step 4: Check out your Sparo profile",id:"step-4-check-out-your-sparo-profile",level:3},{value:"Step 5: Use the mirrored subcommands",id:"step-5-use-the-mirrored-subcommands",level:3}];function d(e){const r={a:"a",blockquote:"blockquote",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,n.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.h2,{id:"everyday-workflow",children:"Everyday workflow"}),"\n",(0,o.jsx)(r.h3,{id:"step-1-upgrade-git",children:"Step 1: Upgrade Git"}),"\n",(0,o.jsxs)(r.p,{children:["Many Git optimizations are relatively new and not available in older versions of the software. For macOS, we recommend to use ",(0,o.jsx)(r.a,{href:"https://git-scm.com/download/mac",children:"brew install git"}),". For other operating systems, see the ",(0,o.jsx)(r.a,{href:"https://git-scm.com/book/en/v2/Getting-Started-Installing-Git",children:"Git documentation"})," for instructions."]}),"\n",(0,o.jsx)(r.h3,{id:"step-2-clone-your-rush-monorepo",children:"Step 2: Clone your Rush monorepo"}),"\n",(0,o.jsxs)(r.p,{children:["Clone your ",(0,o.jsx)(r.a,{href:"https://rushjs.io/",children:"RushJS"})," monorepo:"]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-shell",children:"sparo clone https://github.com/my-company/my-monorepo.git\n"})}),"\n",(0,o.jsxs)(r.p,{children:["\ud83d\udc49 ",(0,o.jsx)(r.em,{children:"For a real world demo, try this repo:"}),"\r\n",(0,o.jsx)(r.a,{href:"https://github.com/Azure/azure-sdk-for-js.git",children:"https://github.com/Azure/azure-sdk-for-js.git"})]}),"\n",(0,o.jsxs)(r.blockquote,{children:["\n",(0,o.jsx)(r.p,{children:"\ud83d\udca1 Support for PNPM and Yarn workspaces is planned but not implemented yet. Contributions welcome!"}),"\n"]}),"\n",(0,o.jsx)(r.p,{children:(0,o.jsx)(r.strong,{children:"Behind the scenes:"})}),"\n",(0,o.jsxs)(r.ul,{children:["\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Only the default branch (usually ",(0,o.jsx)(r.code,{children:"main"}),") is fetched."]}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Git blobless ",(0,o.jsx)(r.a,{href:"/sparo/pages/reference/git_optimization",children:"partial clone"})," is enabled to postpone downloading file contents."]}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["Git ",(0,o.jsx)(r.a,{href:"/sparo/pages/reference/git_optimization",children:"sparse checkout"})," is used to clone only the ",(0,o.jsx)(r.a,{href:"/sparo/pages/reference/skeleton_folders",children:'"skeleton" folders'}),", which includes all workspace ",(0,o.jsx)(r.strong,{children:"package.json"})," files, but excludes the source code subfolders."]}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsx)(r.p,{children:'Sparse checkout is configured for the more efficient "cone mode".'}),"\n"]}),"\n",(0,o.jsxs)(r.li,{children:["\n",(0,o.jsxs)(r.p,{children:["To un
|