1"use strict";(self.webpackChunkrushjs_io=self.webpackChunkrushjs_io||[]).push([[3266],{5552(e,t,n){n.d(t,{xA:()=>d,yg:()=>u});var r=n(829);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(e,t){if(null==e)return{};var n,r,s=function(e,t){if(null==e)return{};var n,r,s={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(s[n]=e[n]);return s}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},d=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef(function(e,t){var n=e.components,s=e.mdxType,o=e.originalType,l=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),h=c(n),u=s,m=h["".concat(l,".").concat(u)]||h[u]||p[u]||o;return n?r.createElement(m,a(a({ref:t},d),{},{components:n})):r.createElement(m,a({ref:t},d))});function u(e,t){var n=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var o=n.length,a=new Array(o);a[0]=h;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i.mdxType="string"==typeof e?e:s,a[1]=i;for(var c=2;c<o;c++)a[c]=n[c];return r.createElement.apply(null,a)}return r.createElement.apply(null,n)}h.displayName="MDXCreateElement"},9359(e,t,n){n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>c,toc:()=>p});var r=n(6443),s=n(8338),o=(n(829),n(5552)),a=["components"],i={title:"rush build"},l=void 0,c={unversionedId:"pages/commands/rush_build",id:"pages/commands/rush_build",title:"rush build",description:"See also",source:"@site/docs/pages/commands/rush_build.md",sourceDirName:"pages/commands",slug:"/pages/commands/rush_build",permalink:"/pages/commands/rush_build",draft:!1,editUrl:"https://github.com/microsoft/rushstack-websites/tree/main/websites/rushjs.io/docs/pages/commands/rush_build.md",tags:[],version:"current",frontMatter:{title:"rush build"},sidebar:"docsSidebar",previous:{title:"rush add",permalink:"/pages/commands/rush_add"},next:{title:"rush change",permalink:"/pages/commands/rush_change"}},d={},p=[{value:"See also",id:"see-also",level:2}],h={toc:p};function u(e){var t=e.components,n=(0,s.A)(e,a);return(0,o.yg)("wrapper",(0,r.A)({},h,n,{components:t,mdxType:"MDXLayout"}),(0,o.yg)("head",null,(0,o.yg)("link",{rel:"canonical",href:"https://rushstack.io/pages/pages/commands/rush_build/"})),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre"},'usage: rush build [-h] [-p COUNT] [--timeline] [-t PROJECT] [-T PROJECT]\n [-f PROJECT] [-o PROJECT] [-i PROJECT] [-I PROJECT]\n [--to-version-policy VERSION_POLICY_NAME]\n [--from-version-policy VERSION_POLICY_NAME] [-v] [-c]\n [--ignore-hooks]\n\n\nThis command is similar to "rush rebuild", except that "rush build" performs\nan incremental build. In other words, it only builds projects whose source\nfiles have changed since the last successful build. The analysis requires a\nGit working tree, and only considers source files that are tracked by Git and\nwhose path is under the project folder. (For more details about this\nalgorithm, see the documentation for the "package-deps-hash" NPM package.)\nThe incremental build state is tracked in a per-project folder called ".\nrush/temp" which should NOT be added to Git. The build command is tracked by\nthe "arguments" field in the "package-deps_build.json" file contained\ntherein; a full rebuild is forced whenever the command has changed (e.g.\n"--production" or not).\n\nOptional arguments:\n -h, --help Show this help message and exit.\n -p COUNT, --parallelism COUNT\n Specifies the maximum number of concurrent processes\n to launch during a build. The COUNT should be a\n positive integer, a percentage value (eg. "50%") or\n the word "max" to specify a count that is equal to\n the number of CPU cores. If this parameter is omitted,\n then the default value depends on the operating\n system and number of CPU cores. This parameter may\n alternatively be specified via the RUSH_PARALLELISM\n environment variable.\n --timeline After the build is complete, print additional\n statistics and CPU usage information, including an\n ASCII chart of the start and stop times for each\n operation.\n -t PROJECT, --to PROJECT\n Normally all projects in the monorepo will be\n processed; adding this parameter will instead select\n a subset of projects. Each "--to" parameter exp
1ands\n this selection to include PROJECT and all its\n dependencies. "." can be used as shorthand for the\n project in the current working directory. For details,\n refer to the website article "Selecting subsets of\n projects".\n -T PROJECT, --to-except PROJECT\n Normally all projects in the monorepo will be\n processed; adding this parameter will instead select\n a subset of projects. Each "--to-except" parameter\n expands this selection to include all dependencies of\n PROJECT, but not PROJECT itself. "." can be used as\n shorthand for the project in the current working\n directory. For details, refer to the website article\n "Selecting subsets of projects".\n -f PROJECT, --from PROJECT\n Normally all projects in the monorepo will be\n processed; adding this parameter will instead select\n a subset of projects. Each "--from" parameter expands\n this selection to include PROJECT and all projects\n that depend on it, plus all dependencies of this set.\n "." can be used as shorthand for the project in the\n current working directory. For details, refer to the\n website article "Selecting subsets of projects".\n -o PROJECT, --only PROJECT\n Normally all projects in the monorepo will be\n processed; adding this parameter will instead select\n a subset of projects. Each "--only" parameter expands\n this selection to include PROJECT; its dependencies\n are not added. "." can be used as shorthand for the\n project in the current working directory. Note that\n this parameter is "unsafe" as it may produce a\n selection that excludes some dependencies. For\n details, refer to the website article "Selecting\n subsets of projects".\n -i PROJECT, --impacted-by PROJECT\n Normally all projects in the monorepo will be\n processed; adding this parameter will instead select\n a subset of projects. Each "--impacted-by" parameter\n expands this selection to include PROJECT and any\n projects that depend on PROJECT (and thus might be\n broken by changes to PROJECT). "." can be used as\n shorthand for the project in the current working\n directory. Note that this parameter is "unsafe" as it\n may produce a selection that excludes some\n dependencies. For details, refer to the website\n article "Selecting subsets of projects".\n -I PROJECT, --impacted-by-except PROJECT\n Normally all projects in the monorepo will be\n processed; adding this parameter will instead select\n a subset of projects. Each "--impacted-by-except"\n parameter works the same as "--impacted-by" except\n that PROJECT itself is not added to the selection. ".\n " can be used as shorthand for the project in the\n current working directory. Note that this parameter\n is "unsafe" as it may produce a selection that\n excludes some dependencies. For details, refer to the\n website article "Selecting subsets of projects".\n --to-version-policy VERSION_POLICY_NAME\n Normally all projects in the monorepo will be\n processed; adding this parameter will instead select\n a subset of projects. The "--to-version-policy"\n parameter is equivalent to specifying "--to" for each\n of the projects belonging to VERSION_POLICY_NAME. For\n details, refer to the website article "Selecting\n subsets of projects".\n --from-version-policy VERSION_POLICY_NAME\n Normally all projects in the monorepo will be\n processed; adding this parameter will instead select\n a subset of projects. The "--from-version-policy"\n parameter is equivalent to specifying "--from" for\n each of the projects belonging to VERSION_POLICY_NAME.\n For details, refer to the website article "Selecting\n subsets of projects".\n -v, --verbose Display the logs during the build, rather than just\n displaying the build status summary\n -c, --ch
1anged-projects-only\n Normally the incremental build logic will rebuild\n changed projects as well as any projects that\n directly or indirectly depend on a changed project.\n Specify "--changed-projects-only" to ignore dependent\n projects, only rebuilding those projects whose files\n were changed. Note that this parameter is "unsafe";\n it is up to the developer to ensure that the ignored\n projects are okay to ignore.\n --ignore-hooks Skips execution of the "eventHooks" scripts defined\n in rush.json. Make sure you know what you are\n skipping.\n')),(0,o.yg)("h2",{id:"see-also"},"See also"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("a",{parentName:"li",href:"/pages/developer/selecting_subsets"},"Selecting subsets of projects")),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("a",{parentName:"li",href:"/pages/commands/rush_rebuild"},"rush rebuild"))))}u.isMDXComponent=!0}}]);
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.