tiktok-sparo/assets/js/d07d9dcb.abf7eac1.js

1 line
5.8 KiB
JavaScript
Raw Normal View History

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[686],{1813:(e,s,o)=>{o.r(s),o.d(s,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>l,toc:()=>a});var n=o(678),t=o(4738);const r={title:"Skeleton folders"},i=void 0,l={id:"pages/reference/skeleton_folders",title:"Skeleton folders",description:'By default sparo clones initializes a sparse checkout that does not include any Sparo profile selections, but does include folders containing essential config files such as package-lock.yaml and package.json. We call this starting point the checkout "skeleton" because it shows the full tree of all project folders in your monorepo, but without their source code subfolders. In other words, although the source files for each project are excluded, the skeleton nonetheless allows engineers to remain aware of other team\'s projects, and how their own project relates to those other projects. This discourages "tunnel vision" (where engineers pretend their project is the only project in the repository), while still ensuring fast Git performance.',source:"@site/docs/pages/reference/skeleton_folders.md",sourceDirName:"pages/reference",slug:"/pages/reference/skeleton_folders",permalink:"/sparo/pages/reference/skeleton_folders",draft:!1,unlisted:!1,editUrl:"https://github.com/tiktok/sparo/tree/main/apps/website/docs/pages/reference/skeleton_folders.md",tags:[],version:"current",frontMatter:{title:"Skeleton folders"},sidebar:"docsSidebar",previous:{title:"Git optimization",permalink:"/sparo/pages/reference/git_optimization"},next:{title:"Security",permalink:"/sparo/pages/reference/security"}},c={},a=[{value:"Skeleton spec",id:"skeleton-spec",level:2},{value:"Handling of nested projects",id:"handling-of-nested-projects",level:2}];function d(e){const s={code:"code",h2:"h2",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.p,{children:["By default ",(0,n.jsx)(s.code,{children:"sparo clones"})," initializes a sparse checkout that does not include any Sparo profile selections, but does include folders containing essential config files such as ",(0,n.jsx)(s.strong,{children:"package-lock.yaml"})," and ",(0,n.jsx)(s.strong,{children:"package.json"}),". We call this starting point the checkout ",(0,n.jsx)(s.strong,{children:'"skeleton"'}),' because it shows the full tree of all project folders in your monorepo, but without their source code subfolders. In other words, although the source files for each project are excluded, the skeleton nonetheless allows engineers to remain aware of other team\'s projects, and how their own project relates to those other projects. This discourages "tunnel vision" (where engineers pretend their project is the only project in the repository), while still ensuring fast Git performance.']}),"\n",(0,n.jsx)(s.p,{children:'Because Sparo enables the "cone mode" optimization for Git sparse checkout, the skeleton uses globs to match entire folders, not individual files.'}),"\n",(0,n.jsx)(s.h2,{id:"skeleton-spec",children:"Skeleton spec"}),"\n",(0,n.jsx)(s.p,{children:"The included folders are as follows:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["The entire ",(0,n.jsx)(s.code,{children:"common/**"})," folder, which generally includes all the important config files and autoinstallers for Rush operations"]}),"\n",(0,n.jsxs)(s.li,{children:["For every project defined in ",(0,n.jsx)(s.strong,{children:"rush.json"}),", the top-level project folder contents. For example, ",(0,n.jsx)(s.strong,{children:"packages/my-app/package.json"})," and ",(0,n.jsx)(s.strong,{children:"packages/my-app/README.md"})," will be included, but not ",(0,n.jsx)(s.strong,{children:"packages/my-app/src/index.ts"}),"."]}),"\n",(0,n.jsxs)(s.li,{children:["The ",(0,n.jsx)(s.code,{children:"scripts/**"})," and ",(0,n.jsx)(s.code,{children:"plugins/**"})," top-level folders, because these names are commonly used for other essential projects."]}),"\n"]}),"\n",(0,n.jsxs)(s.p,{children:["When a Sparo profile is ch