@teambit/pipelines.aspect-docs.builder 0.0.0-02c7dcca80975692ca58bea9be10f787b9ea26ca

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { ThemeCompositions } from '@teambit/documenter.theme.theme-compositions';
3
+ import { MDXLayout } from '@teambit/mdx.ui.mdx-layout';
4
+ import { Builder } from './index';
5
+
6
+ export const BuilderDocs = () => (
7
+ <ThemeCompositions>
8
+ <MDXLayout>
9
+ <Builder />
10
+ </MDXLayout>
11
+ </ThemeCompositions>
12
+ );
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: 'Docs for Builder Aspect'
3
+ labels: ['docs', 'aspect', 'extensions']
4
+ ---
5
+
6
+ import { Builder } from './index';
7
+
8
+ ## Static Content Page in MDX
9
+
10
+ Docs for Builder aspect
11
+
12
+ ### Component usage
13
+
14
+ Use your component in any mdx file:
15
+
16
+ ```jsx
17
+ import { Builder } from '@teambit/aspect-docs.builder';
18
+
19
+ <Builder />;
20
+ ```
21
+
22
+ ### Render with theme and MDX providers
23
+
24
+ ```jsx
25
+ import { ThemeCompositions } from '@teambit/documenter.theme.theme-compositions';
26
+ import { MDXLayout } from '@teambit/ui.mdx-layout';
27
+ import { Builder } from '@teambit/aspect-docs.builder';
28
+
29
+ <ThemeCompositions>
30
+ <MDXLayout>
31
+ <Builder />
32
+ </MDXLayout>
33
+ </ThemeCompositions>;
34
+ ```
package/builder.mdx ADDED
@@ -0,0 +1,345 @@
1
+ ## Background
2
+
3
+ Bit's build process is an extensible CI for independent components. It validates a component is not dependent on its context (the workspace), tests it, and generates all artifacts necessary for it to be viewed and consumed as an independent module (its distributable code, bundled preview, etc.).
4
+
5
+ The Build Pipeline is an Environment Service responsible for sequencing and executing a component's Build Tasks. As mentioned earlier, these tasks are performed on a component only after it's been isolated from the rest of the workspace.
6
+
7
+ A component's default series of Build Tasks is composed of tasks set by Bit and by its environment.
8
+
9
+ ## Isolated builds
10
+
11
+ Components authored in a Bit workspace are created to be completely portable, and thus independent. To address that, the build process starts by creating a component 'capsule' which is an isolated instance of a component, generated in a separate directory in your filesystem.
12
+
13
+ As part of the capsule creation, all packages listed as dependencies of that component will be installed. This step is necessary to validate there are no dependency-graph issues (a component that is not totally isolated will be able to use packages installed in parent directories in your workspace, by other components. This will translate into a "false positive" result when testing for dependency-graph issues in a non-isolated location).
14
+
15
+ ## Incremental builds
16
+
17
+ When a component "goes through" the build pipeline, all of its dependencies are built as well. If a dependency has not changed since its last build, the build process will use its artifacts from the previous build (and will not process it again). This optimization to the build process supplements the "innate optimization" that naturally comes from developing (and building) independent components instead of a single monolithic codebase.
18
+
19
+ ## Environment-specific builds
20
+
21
+ Each Bit environment determines its own build pipeline. That means, a single workspace that uses multiple environments will run a different set of build tasks on different components depending on their associated environment. This is another Bit feature that enables seamless transitioning between different development environments, all in the same workspace. It also makes it much easier to integrate the Build Pipeline in your (remote) CI, as it only requires executing the build step - all other per-component build configurations are already set by the various environments being used.
22
+
23
+ Since environments are extensible, so are the build pipelines configured by them.
24
+
25
+ ## Build task
26
+
27
+ An example of a build-task is `compile`, it's written in the compiler aspect and is running on each one of the capsules created by the build process. build-tasks in many cases generate artifacts, in this case, the compiler generates `dists` files and write them on the isolated capsules. There artifacts files are used later for example when creating packages.
28
+
29
+ ## Pipelines
30
+
31
+ There are three pipelines: `build`, `tag` and `snap`.
32
+
33
+ - `bit build` runs the build pipeline.
34
+ - `bit tag` runs the build pipeline and then the tag pipeline.
35
+ - `bit snap` runs the build pipeline and then the snap pipeline.
36
+
37
+ ## List Build Tasks
38
+
39
+ To get a list of all the tasks that will be running per pipeline on a specific component, run `bit build --list-tasks <id>`.
40
+ Here is an example of the relevant part from the output:
41
+
42
+ ```
43
+ ➜ bit build --list-tasks ui/tooltip
44
+ Tasks List
45
+ id: teambit.design/ui/tooltip@0.0.347
46
+ envId: teambit.react/react
47
+
48
+ Build Pipeline Tasks:
49
+ teambit.harmony/aspect:CoreExporter
50
+ teambit.compilation/compiler:TSCompiler
51
+ teambit.defender/tester:TestComponents
52
+ teambit.pkg/pkg:PreparePackages
53
+ teambit.pkg/pkg:PublishDryRun
54
+ teambit.preview/preview:GeneratePreview
55
+
56
+ Tag Pipeline Tasks:
57
+ teambit.harmony/application:build_ui_application
58
+ teambit.pkg/pkg:PublishComponents
59
+
60
+ Snap Pipeline Tasks:
61
+ <N/A>
62
+ ```
63
+
64
+ ## Implementing Build Tasks
65
+
66
+ The `BuildTask` interface is a good start to understand how to implement a new build-task.
67
+ When writing a build task, the `Network` object is passed and it includes the seeders capsules, as well as the entire graph including the dependencies.
68
+ Keep in mind that the entire graph may contain components from other envs.
69
+
70
+ Some tasks, such as, compiling in typescript and bundling with Webpack, need the entire graph.
71
+ Others, such as, Babel, need only the seeders. However, normally, the bundling is running after the compilation and it expects to have the dependencies compiled, so you might need the entire graph regardless.
72
+
73
+ ## Adding Tasks to a pipeline
74
+
75
+ There are two ways of adding tasks to the build pipeline.
76
+
77
+ 1. `getBuildPipe()` method of the env. (or `getTagPipe()` and `getSnapPipe()`)
78
+ 2. registering to the slot via `builder.registerBuildTask()`. (or `registerTagTask()` and `registerSnapTask()`)
79
+
80
+ in the option #1, it's possible to determine the order. e.g. `getBuildPipe() { return [taskA, taskB, taskC]; }`
81
+ in the option #2, the register happens once the extension is loaded, so there is no way to put
82
+ one task before/after another task as of now.
83
+
84
+ ## Sequencing the build tasks
85
+
86
+ The Build Pipeline takes into consideration the following factors when deciding the order of which to execute each task:
87
+
88
+ - **Location**: A task can be executed either at the start or end of the build pipeline. This can be explicitly configured by the task itself.
89
+ - **Dependencies**: A task can depend on other tasks. That means, the dependencies must be completed successfully for all envs before this task starts. The dependencies are applicable inside a location and not across locations. This is configured by the task itself.
90
+ - **An environment's list of build tasks**: This is the array of tasks as it is defined by an environment
91
+
92
+ ## Executing the pipelines
93
+
94
+ Commands that trigger the build pipeline:
95
+
96
+ - `bit build` - runs the build pipeline on your local machine, for the entire workspace. The output data will not persist. - That is most often used for testing and debugging the build process.
97
+ - `bit tag` - runs the tag pipeline in addition to the build pipeline, before creating a new component release version. The output data will persist.
98
+ - `bit snap` - runs the snap pipeline in addition to the build pipeline. The output data will persist.
99
+
100
+ Build pipelines are determined by the environments in use. That means, in order to override the default pipeline, we need to create a new environment extension or modify an existing one.
101
+
102
+ The example task below, shown being used by a customized environment, prints out the component name of every component handled by it. In addition to that, the task returns the component name as custom metadata to be logged and/or stored in the component tagged version. [See a demo project here](https://github.com/teambit/harmony-build-examples).
103
+
104
+ > Information returned by a build task will only persist if the build-pipeline was triggered by the 'hard-tag' command (`bit tag <component-id>`).
105
+
106
+ ```ts title="print-cmp-name-task.ts"
107
+ import { BuildTask, BuildContext, BuiltTaskResult, ComponentResult } from '@teambit/builder';
108
+
109
+ // A task is an implementation of 'BuildTask' provided by the 'builder' aspect
110
+ export class PrintCmpNameTask implements BuildTask {
111
+ // The constructor leaves these properties up to the hands of the environment using this task
112
+ constructor(
113
+ readonly aspectId: string,
114
+ readonly name: string
115
+ ) {}
116
+
117
+ // This is where the task logic is placed. It will be executed by the build pipeline
118
+ async execute(context: BuildContext): Promise<BuiltTaskResult> {
119
+ const componentsResults: ComponentResult[] = [];
120
+
121
+ // Go through every isolated component instance
122
+ context.capsuleNetwork.seedersCapsules.forEach((capsule) => {
123
+ console.log(`The current component name is: ${capsule.component.id.name}`);
124
+
125
+ componentsResults.push({
126
+ component: capsule.component,
127
+ metadata: { customProp: capsule.component.id.name },
128
+ });
129
+ });
130
+ return {
131
+ // An array of component objects, enriched with additional data produced by the task
132
+ componentsResults,
133
+ };
134
+ }
135
+ }
136
+ ```
137
+
138
+ ```ts title="customized-react.extension.ts"
139
+ import { EnvsMain, EnvsAspect } from '@teambit/envs';
140
+ import { ReactAspect, ReactMain } from '@teambit/react';
141
+
142
+ // Import the task
143
+ import { PrintCmpNameTask } from './print-cmp-name-task';
144
+
145
+ export class CustomReact {
146
+ constructor(private react: ReactMain) {}
147
+
148
+ static dependencies: any = [EnvsAspect, ReactAspect];
149
+
150
+ static async provider([envs, react]: [EnvsMain, ReactMain]) {
151
+ // Get the environment's default build pipeline
152
+ const reactPipe = react.env.getBuildPipe();
153
+
154
+ // Add the custom task to the end of the build tasks sequence.
155
+ // Provide the task with the component ID of the extension using it.
156
+ // Provide the ask with a name.
157
+ const tasks = [...reactPipe, new PrintCompTask('extensions/custom-react', 'PrintCmpNameTask')];
158
+
159
+ // Create a new environment by merging these configurations with the env's default ones
160
+ const customReactEnv = react.compose([react.overrideBuildPipe(tasks)]);
161
+
162
+ // register the extension as an environment
163
+ envs.registerEnv(customReactEnv);
164
+ return new CustomReact(react);
165
+ }
166
+ }
167
+ ```
168
+
169
+ ## Positioning a build task in the pipeline
170
+
171
+ A build task is positioned in the build pipeline sequence either by overriding the entire _customizable_ pipeline or, by registering it to a location in the pipeline using the designated builder slot.
172
+
173
+ ### Override the build pipeline sequence
174
+
175
+ This methodology leaves the task completely agnostic as to its position in the build pipeline. Instead, the task position is determined by the environment using the `getBuildPipe` Environment Handler.
176
+
177
+ The example above shows the React environment `overrideBuildPipe` method being used to override its default pipeline. This method uses the `getBuildPipe()` Environment Handler, internally.
178
+
179
+ ### Append to the start or end of the pipeline, in relation to other tasks
180
+
181
+ This methodology places the task at the start or end of the build pipeline sequence, and lists all other tasks needed to run successfully before it is executed.
182
+
183
+ Example:
184
+
185
+ ```ts title="print-cmp-name-task.ts"
186
+ import { BuildTask, BuildContext, BuiltTaskResult, ComponentResult } from '@teambit/builder';
187
+
188
+ export class PrintCmpNameTask implements BuildTask {
189
+ constructor(
190
+ readonly aspectId: string,
191
+ readonly name: string
192
+ ) {}
193
+
194
+ // Place the task at the end of the build pipeline
195
+ readonly location = 'end';
196
+
197
+ // Run this task only after the '@teambit/preview' task is completed successfully
198
+ readonly dependencies = ['@teambit/preview'];
199
+
200
+ async execute(context: BuildContext): Promise<BuiltTaskResult> {
201
+ const componentsResults: ComponentResult[] = [];
202
+ context.capsuleNetwork.seedersCapsules.forEach((capsule) => {
203
+ console.log(`The current component name is: ${capsule.component.id.name}`);
204
+
205
+ componentsResults.push({
206
+ component: capsule.component,
207
+ metadata: { customProp: capsule.component.id.name },
208
+ });
209
+ });
210
+ return {
211
+ componentsResults,
212
+ };
213
+ }
214
+ }
215
+ ```
216
+
217
+ ```ts title="customized-react.extension.ts"
218
+ import { EnvsMain, EnvsAspect } from '@teambit/envs';
219
+ import { ReactAspect, ReactMain } from '@teambit/react';
220
+ import { BuilderMain } from '@teambit/builder';
221
+
222
+ // Import the task (in reality, it should be an independent component)
223
+ import { PrintCmpNameTask } from './print-cmp-name-task';
224
+
225
+ export class CustomReact {
226
+ constructor(private react: ReactMain) {}
227
+
228
+ static dependencies: any = [EnvsAspect, ReactAspect];
229
+
230
+ // Inject the builder
231
+ static async provider([envs, react, builder]: [EnvsMain, ReactMain, BuilderMain]) {
232
+ // Register this task using the registration slot, made available by the 'builder'.
233
+ // Here, the environment has no say in the positioning of the task
234
+ builder.registerBuildTasks([new ExampleTask('extensions/custom-react', 'PrintCmpNameTask')]);
235
+
236
+ const customReactEnv = react.compose([]);
237
+
238
+ envs.registerEnv(customReactEnv);
239
+ return new CustomReact(react);
240
+ }
241
+ }
242
+ ```
243
+
244
+ ## A build task anatomy
245
+
246
+ - **aspectId** <br />
247
+ `aspectId: string`<br />
248
+ The component ID of the environment using this task.
249
+
250
+ - **name** <br />
251
+ `name: string` <br />
252
+ A name for this task. Only alphanumerical characters are allowed. PascalCase should be used as a convention.
253
+
254
+ - **location** <br />
255
+ `location?: 'start' | 'end'` <br />
256
+ The section of the build-pipeline to which to append this task.
257
+
258
+ - **dependencies** <br />
259
+ `dependencies?: string[]` <br />
260
+ An list of tasks that must be completed before this task gets executed. <br />
261
+ For example `dependencies = ['@teambit/preview']`.
262
+
263
+ - **execute** <br />
264
+ `execute(context: BuildContext): Promise<BuiltTaskResult>` <br />
265
+ The execute method is where all the task logic is placed.
266
+
267
+ - **context** (argument) <br />
268
+ `context: BuildContext` <br />
269
+ The context of the build pipeline. Use this object (provided by the build pipeline) to get information regarding all components handled by the build pipeline. <br /><br />
270
+ For example, `context.capsuleNetwork.seedersCapsules` are models representing isolated instances of components handled by the build pipeline. These isolated instances are independent projects, generated in your local filesystem (by the build pipeline).
271
+
272
+ - **return** <br />
273
+ `Promise<BuiltTaskResult>` <br />
274
+ A `context` method returns an object with data regarding the build task process, additional data regarding the components handled by the task and, if available, data regarding the different artifacts generated by this task.<br />
275
+ The returned object has the following attributes:
276
+
277
+ - **componentsResults** <br />
278
+ `componentsResults: ComponentResult[]`
279
+ An array of objects, each containing an instance of an object handled the task and additional information regarding the process and the component itself.
280
+ - **component** <br />
281
+ `component: Component` <br />
282
+ An instance of the component handled by the task (see the above task example).
283
+
284
+ - **metadata** <br />
285
+ `metadata?: { [key: string]: Serializable }` <br />
286
+ Component metadata generated during the build task.
287
+
288
+ - **errors** <br />
289
+ `errors?: Array<Error | string>` <br />
290
+ Build task errors. A task returning errors will abort the build pipeline and log the returned errors.
291
+
292
+ - **warnings** <br />
293
+ `warnings?: string[]` <br />
294
+ warnings generated throughout the build task.
295
+
296
+ - **startTime** <br />
297
+ `startTime?: number` <br />
298
+ A timestamp (in milliseconds) of when the task started
299
+
300
+ - **endTime** <br />
301
+ `endTime?: number` <br />
302
+ A timestamp (in milliseconds) of when the task ended
303
+ - **artifacts** <br />
304
+ `artifacts?: ArtifactDefinition[]` <br />
305
+ An array of artifact definitions to generate after a successful build
306
+ - **name** <br />
307
+ `name: string` <br />
308
+ The name of the artifact. <br />
309
+ For example, a project might utilize two different artifacts for the same typescript compiler, one that generates ES5 files and another for ES6. This prop helps to distinguish between the two.
310
+ - **generatedBy** <br />
311
+ `generatedBy?: string;` <br />
312
+ Id of the component that generated this artifact.
313
+
314
+ - **description** <br />
315
+ `description?: string` <br />
316
+ A description of the artifact. <br />
317
+
318
+ - **globPatterns** <br />
319
+ `globPatterns: string[]` <br />
320
+ Glob patterns of files to include upon artifact creation. Minimatch is used to match the patterns. <br />
321
+ For example, `['*.ts', '!foo.ts']` matches all ts files but ignores `foo.ts`.
322
+
323
+ - **rootDir** <br />
324
+ `rootDir?: string` <br />
325
+ Defines the root directory of the artifacts in the capsule file system. The rootDir must be unique for every artifact, otherwise data might be overridden.
326
+
327
+ - **dirPrefix** <br />
328
+ `dirPrefix?: string` <br />
329
+ Adds a directory prefix for all artifact files.
330
+
331
+ - **context** <br />
332
+ `context?: 'component' | 'env'` <br />
333
+ Determine the context of the artifact. The default artifact context is `component`. `env` is useful when the same file is generated for all components, for example, a "preview" task may create the same webpack file for all components of that env.
334
+
335
+ - **storageResolver** <br />
336
+ `storageResolver?: string` <br />
337
+ Used to replace the location of the stored artifacts. The default resolver persists artifacts on scope (that's not recommended for large files).
338
+
339
+ - **preBuild** (advanced) <br />
340
+ `preBuild?(context: BuildContext): Promise<void>` <br />
341
+ Runs before the build pipeline has started. This method should only be used when preparations are needed to be done on all environments before the build starts.
342
+
343
+ - **postBuild** (advanced) <br />
344
+ `postBuild?(context: BuildContext, tasksResults: TaskResultsList): Promise<void>` <br />
345
+ Runs after the dependencies were completed for all environments.
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const BuilderDocs: () => React.JSX.Element;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.BuilderDocs = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const documenter_theme_theme_compositions_1 = require("@teambit/documenter.theme.theme-compositions");
9
+ const mdx_ui_mdx_layout_1 = require("@teambit/mdx.ui.mdx-layout");
10
+ const index_1 = require("./index");
11
+ const BuilderDocs = () => (react_1.default.createElement(documenter_theme_theme_compositions_1.ThemeCompositions, null,
12
+ react_1.default.createElement(mdx_ui_mdx_layout_1.MDXLayout, null,
13
+ react_1.default.createElement(index_1.Builder, null))));
14
+ exports.BuilderDocs = BuilderDocs;
15
+ //# sourceMappingURL=builder.composition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builder.composition.js","sourceRoot":"","sources":["../builder.composition.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,sGAAiF;AACjF,kEAAuD;AACvD,mCAAkC;AAE3B,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,CAC/B,8BAAC,uDAAiB;IAChB,8BAAC,6BAAS;QACR,8BAAC,eAAO,OAAG,CACD,CACM,CACrB,CAAC;AANW,QAAA,WAAW,eAMtB"}
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: 'Docs for Builder Aspect'
3
+ labels: ['docs', 'aspect', 'extensions']
4
+ ---
5
+
6
+ import { Builder } from './index';
7
+
8
+ ## Static Content Page in MDX
9
+
10
+ Docs for Builder aspect
11
+
12
+ ### Component usage
13
+
14
+ Use your component in any mdx file:
15
+
16
+ ```jsx
17
+ import { Builder } from '@teambit/aspect-docs.builder';
18
+
19
+ <Builder />;
20
+ ```
21
+
22
+ ### Render with theme and MDX providers
23
+
24
+ ```jsx
25
+ import { ThemeCompositions } from '@teambit/documenter.theme.theme-compositions';
26
+ import { MDXLayout } from '@teambit/ui.mdx-layout';
27
+ import { Builder } from '@teambit/aspect-docs.builder';
28
+
29
+ <ThemeCompositions>
30
+ <MDXLayout>
31
+ <Builder />
32
+ </MDXLayout>
33
+ </ThemeCompositions>;
34
+ ```
@@ -0,0 +1,355 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = MDXContent;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _react2 = require("@mdx-js/react");
9
+ var _excluded = ["components"]; // @ts-nocheck
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
12
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
13
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
14
+ /* @jsxRuntime classic */
15
+ /* @jsx mdx */
16
+
17
+ var layoutProps = {};
18
+ var MDXLayout = "wrapper";
19
+ function MDXContent(_ref) {
20
+ var components = _ref.components,
21
+ props = _objectWithoutProperties(_ref, _excluded);
22
+ return (0, _react2.mdx)(MDXLayout, _extends({}, layoutProps, props, {
23
+ components: components,
24
+ mdxType: "MDXLayout"
25
+ }), (0, _react2.mdx)("h2", null, "Background"), (0, _react2.mdx)("p", null, "Bit's build process is an extensible CI for independent components. It validates a component is not dependent on its context (the workspace), tests it, and generates all artifacts necessary for it to be viewed and consumed as an independent module (its distributable code, bundled preview, etc.)."), (0, _react2.mdx)("p", null, "The Build Pipeline is an Environment Service responsible for sequencing and executing a component's Build Tasks. As mentioned earlier, these tasks are performed on a component only after it's been isolated from the rest of the workspace."), (0, _react2.mdx)("p", null, "A component's default series of Build Tasks is composed of tasks set by Bit and by its environment."), (0, _react2.mdx)("h2", null, "Isolated builds"), (0, _react2.mdx)("p", null, "Components authored in a Bit workspace are created to be completely portable, and thus independent. To address that, the build process starts by creating a component 'capsule' which is an isolated instance of a component, generated in a separate directory in your filesystem."), (0, _react2.mdx)("p", null, "As part of the capsule creation, all packages listed as dependencies of that component will be installed. This step is necessary to validate there are no dependency-graph issues (a component that is not totally isolated will be able to use packages installed in parent directories in your workspace, by other components. This will translate into a \"false positive\" result when testing for dependency-graph issues in a non-isolated location)."), (0, _react2.mdx)("h2", null, "Incremental builds"), (0, _react2.mdx)("p", null, "When a component \"goes through\" the build pipeline, all of its dependencies are built as well. If a dependency has not changed since its last build, the build process will use its artifacts from the previous build (and will not process it again). This optimization to the build process supplements the \"innate optimization\" that naturally comes from developing (and building) independent components instead of a single monolithic codebase."), (0, _react2.mdx)("h2", null, "Environment-specific builds"), (0, _react2.mdx)("p", null, "Each Bit environment determines its own build pipeline. That means, a single workspace that uses multiple environments will run a different set of build tasks on different components depending on their associated environment. This is another Bit feature that enables seamless transitioning between different development environments, all in the same workspace. It also makes it much easier to integrate the Build Pipeline in your (remote) CI, as it only requires executing the build step - all other per-component build configurations are already set by the various environments being used."), (0, _react2.mdx)("p", null, "Since environments are extensible, so are the build pipelines configured by them."), (0, _react2.mdx)("h2", null, "Build task"), (0, _react2.mdx)("p", null, "An example of a build-task is ", (0, _react2.mdx)("inlineCode", {
26
+ parentName: "p"
27
+ }, "compile"), ", it's written in the compiler aspect and is running on each one of the capsules created by the build process. build-tasks in many cases generate artifacts, in this case, the compiler generates ", (0, _react2.mdx)("inlineCode", {
28
+ parentName: "p"
29
+ }, "dists"), " files and write them on the isolated capsules. There artifacts files are used later for example when creating packages."), (0, _react2.mdx)("h2", null, "Pipelines"), (0, _react2.mdx)("p", null, "There are three pipelines: ", (0, _react2.mdx)("inlineCode", {
30
+ parentName: "p"
31
+ }, "build"), ", ", (0, _react2.mdx)("inlineCode", {
32
+ parentName: "p"
33
+ }, "tag"), " and ", (0, _react2.mdx)("inlineCode", {
34
+ parentName: "p"
35
+ }, "snap"), "."), (0, _react2.mdx)("ul", null, (0, _react2.mdx)("li", {
36
+ parentName: "ul"
37
+ }, (0, _react2.mdx)("inlineCode", {
38
+ parentName: "li"
39
+ }, "bit build"), " runs the build pipeline."), (0, _react2.mdx)("li", {
40
+ parentName: "ul"
41
+ }, (0, _react2.mdx)("inlineCode", {
42
+ parentName: "li"
43
+ }, "bit tag"), " runs the build pipeline and then the tag pipeline."), (0, _react2.mdx)("li", {
44
+ parentName: "ul"
45
+ }, (0, _react2.mdx)("inlineCode", {
46
+ parentName: "li"
47
+ }, "bit snap"), " runs the build pipeline and then the snap pipeline.")), (0, _react2.mdx)("h2", null, "List Build Tasks"), (0, _react2.mdx)("p", null, "To get a list of all the tasks that will be running per pipeline on a specific component, run ", (0, _react2.mdx)("inlineCode", {
48
+ parentName: "p"
49
+ }, "bit build --list-tasks <id>"), ".\nHere is an example of the relevant part from the output:"), (0, _react2.mdx)("pre", null, (0, _react2.mdx)("code", {
50
+ parentName: "pre"
51
+ }, "\u279C bit build --list-tasks ui/tooltip\nTasks List\nid: teambit.design/ui/tooltip@0.0.347\nenvId: teambit.react/react\n\nBuild Pipeline Tasks:\nteambit.harmony/aspect:CoreExporter\nteambit.compilation/compiler:TSCompiler\nteambit.defender/tester:TestComponents\nteambit.pkg/pkg:PreparePackages\nteambit.pkg/pkg:PublishDryRun\nteambit.preview/preview:GeneratePreview\n\nTag Pipeline Tasks:\nteambit.harmony/application:build_ui_application\nteambit.pkg/pkg:PublishComponents\n\nSnap Pipeline Tasks:\n<N/A>\n")), (0, _react2.mdx)("h2", null, "Implementing Build Tasks"), (0, _react2.mdx)("p", null, "The ", (0, _react2.mdx)("inlineCode", {
52
+ parentName: "p"
53
+ }, "BuildTask"), " interface is a good start to understand how to implement a new build-task.\nWhen writing a build task, the ", (0, _react2.mdx)("inlineCode", {
54
+ parentName: "p"
55
+ }, "Network"), " object is passed and it includes the seeders capsules, as well as the entire graph including the dependencies.\nKeep in mind that the entire graph may contain components from other envs."), (0, _react2.mdx)("p", null, "Some tasks, such as, compiling in typescript and bundling with Webpack, need the entire graph.\nOthers, such as, Babel, need only the seeders. However, normally, the bundling is running after the compilation and it expects to have the dependencies compiled, so you might need the entire graph regardless."), (0, _react2.mdx)("h2", null, "Adding Tasks to a pipeline"), (0, _react2.mdx)("p", null, "There are two ways of adding tasks to the build pipeline."), (0, _react2.mdx)("ol", null, (0, _react2.mdx)("li", {
56
+ parentName: "ol"
57
+ }, (0, _react2.mdx)("inlineCode", {
58
+ parentName: "li"
59
+ }, "getBuildPipe()"), " method of the env. (or ", (0, _react2.mdx)("inlineCode", {
60
+ parentName: "li"
61
+ }, "getTagPipe()"), " and ", (0, _react2.mdx)("inlineCode", {
62
+ parentName: "li"
63
+ }, "getSnapPipe()"), ")"), (0, _react2.mdx)("li", {
64
+ parentName: "ol"
65
+ }, "registering to the slot via ", (0, _react2.mdx)("inlineCode", {
66
+ parentName: "li"
67
+ }, "builder.registerBuildTask()"), ". (or ", (0, _react2.mdx)("inlineCode", {
68
+ parentName: "li"
69
+ }, "registerTagTask()"), " and ", (0, _react2.mdx)("inlineCode", {
70
+ parentName: "li"
71
+ }, "registerSnapTask()"), ")")), (0, _react2.mdx)("p", null, "in the option #1, it's possible to determine the order. e.g. ", (0, _react2.mdx)("inlineCode", {
72
+ parentName: "p"
73
+ }, "getBuildPipe() { return [taskA, taskB, taskC]; }"), "\nin the option #2, the register happens once the extension is loaded, so there is no way to put\none task before/after another task as of now."), (0, _react2.mdx)("h2", null, "Sequencing the build tasks"), (0, _react2.mdx)("p", null, "The Build Pipeline takes into consideration the following factors when deciding the order of which to execute each task:"), (0, _react2.mdx)("ul", null, (0, _react2.mdx)("li", {
74
+ parentName: "ul"
75
+ }, (0, _react2.mdx)("strong", {
76
+ parentName: "li"
77
+ }, "Location"), ": A task can be executed either at the start or end of the build pipeline. This can be explicitly configured by the task itself."), (0, _react2.mdx)("li", {
78
+ parentName: "ul"
79
+ }, (0, _react2.mdx)("strong", {
80
+ parentName: "li"
81
+ }, "Dependencies"), ": A task can depend on other tasks. That means, the dependencies must be completed successfully for all envs before this task starts. The dependencies are applicable inside a location and not across locations. This is configured by the task itself."), (0, _react2.mdx)("li", {
82
+ parentName: "ul"
83
+ }, (0, _react2.mdx)("strong", {
84
+ parentName: "li"
85
+ }, "An environment's list of build tasks"), ": This is the array of tasks as it is defined by an environment")), (0, _react2.mdx)("h2", null, "Executing the pipelines"), (0, _react2.mdx)("p", null, "Commands that trigger the build pipeline:"), (0, _react2.mdx)("ul", null, (0, _react2.mdx)("li", {
86
+ parentName: "ul"
87
+ }, (0, _react2.mdx)("inlineCode", {
88
+ parentName: "li"
89
+ }, "bit build"), " - runs the build pipeline on your local machine, for the entire workspace. The output data will not persist. - That is most often used for testing and debugging the build process."), (0, _react2.mdx)("li", {
90
+ parentName: "ul"
91
+ }, (0, _react2.mdx)("inlineCode", {
92
+ parentName: "li"
93
+ }, "bit tag"), " - runs the tag pipeline in addition to the build pipeline, before creating a new component release version. The output data will persist."), (0, _react2.mdx)("li", {
94
+ parentName: "ul"
95
+ }, (0, _react2.mdx)("inlineCode", {
96
+ parentName: "li"
97
+ }, "bit snap"), " - runs the snap pipeline in addition to the build pipeline. The output data will persist.")), (0, _react2.mdx)("p", null, "Build pipelines are determined by the environments in use. That means, in order to override the default pipeline, we need to create a new environment extension or modify an existing one."), (0, _react2.mdx)("p", null, "The example task below, shown being used by a customized environment, prints out the component name of every component handled by it. In addition to that, the task returns the component name as custom metadata to be logged and/or stored in the component tagged version. ", (0, _react2.mdx)("a", {
98
+ parentName: "p",
99
+ "href": "https://github.com/teambit/harmony-build-examples"
100
+ }, "See a demo project here"), "."), (0, _react2.mdx)("blockquote", null, (0, _react2.mdx)("p", {
101
+ parentName: "blockquote"
102
+ }, "Information returned by a build task will only persist if the build-pipeline was triggered by the 'hard-tag' command (", (0, _react2.mdx)("inlineCode", {
103
+ parentName: "p"
104
+ }, "bit tag <component-id>"), ").")), (0, _react2.mdx)("pre", null, (0, _react2.mdx)("code", {
105
+ parentName: "pre",
106
+ "className": "language-ts",
107
+ "metastring": "title=\"print-cmp-name-task.ts\"",
108
+ "title": "\"print-cmp-name-task.ts\""
109
+ }, "import { BuildTask, BuildContext, BuiltTaskResult, ComponentResult } from '@teambit/builder';\n\n// A task is an implementation of 'BuildTask' provided by the 'builder' aspect\nexport class PrintCmpNameTask implements BuildTask {\n // The constructor leaves these properties up to the hands of the environment using this task\n constructor(\n readonly aspectId: string,\n readonly name: string\n ) {}\n\n // This is where the task logic is placed. It will be executed by the build pipeline\n async execute(context: BuildContext): Promise<BuiltTaskResult> {\n const componentsResults: ComponentResult[] = [];\n\n // Go through every isolated component instance\n context.capsuleNetwork.seedersCapsules.forEach((capsule) => {\n console.log(`The current component name is: ${capsule.component.id.name}`);\n\n componentsResults.push({\n component: capsule.component,\n metadata: { customProp: capsule.component.id.name },\n });\n });\n return {\n // An array of component objects, enriched with additional data produced by the task\n componentsResults,\n };\n }\n}\n")), (0, _react2.mdx)("pre", null, (0, _react2.mdx)("code", {
110
+ parentName: "pre",
111
+ "className": "language-ts",
112
+ "metastring": "title=\"customized-react.extension.ts\"",
113
+ "title": "\"customized-react.extension.ts\""
114
+ }, "import { EnvsMain, EnvsAspect } from '@teambit/envs';\nimport { ReactAspect, ReactMain } from '@teambit/react';\n\n// Import the task\nimport { PrintCmpNameTask } from './print-cmp-name-task';\n\nexport class CustomReact {\n constructor(private react: ReactMain) {}\n\n static dependencies: any = [EnvsAspect, ReactAspect];\n\n static async provider([envs, react]: [EnvsMain, ReactMain]) {\n // Get the environment's default build pipeline\n const reactPipe = react.env.getBuildPipe();\n\n // Add the custom task to the end of the build tasks sequence.\n // Provide the task with the component ID of the extension using it.\n // Provide the ask with a name.\n const tasks = [...reactPipe, new PrintCompTask('extensions/custom-react', 'PrintCmpNameTask')];\n\n // Create a new environment by merging these configurations with the env's default ones\n const customReactEnv = react.compose([react.overrideBuildPipe(tasks)]);\n\n // register the extension as an environment\n envs.registerEnv(customReactEnv);\n return new CustomReact(react);\n }\n}\n")), (0, _react2.mdx)("h2", null, "Positioning a build task in the pipeline"), (0, _react2.mdx)("p", null, "A build task is positioned in the build pipeline sequence either by overriding the entire ", (0, _react2.mdx)("em", {
115
+ parentName: "p"
116
+ }, "customizable"), " pipeline or, by registering it to a location in the pipeline using the designated builder slot."), (0, _react2.mdx)("h3", null, "Override the build pipeline sequence"), (0, _react2.mdx)("p", null, "This methodology leaves the task completely agnostic as to its position in the build pipeline. Instead, the task position is determined by the environment using the ", (0, _react2.mdx)("inlineCode", {
117
+ parentName: "p"
118
+ }, "getBuildPipe"), " Environment Handler."), (0, _react2.mdx)("p", null, "The example above shows the React environment ", (0, _react2.mdx)("inlineCode", {
119
+ parentName: "p"
120
+ }, "overrideBuildPipe"), " method being used to override its default pipeline. This method uses the ", (0, _react2.mdx)("inlineCode", {
121
+ parentName: "p"
122
+ }, "getBuildPipe()"), " Environment Handler, internally."), (0, _react2.mdx)("h3", null, "Append to the start or end of the pipeline, in relation to other tasks"), (0, _react2.mdx)("p", null, "This methodology places the task at the start or end of the build pipeline sequence, and lists all other tasks needed to run successfully before it is executed."), (0, _react2.mdx)("p", null, "Example:"), (0, _react2.mdx)("pre", null, (0, _react2.mdx)("code", {
123
+ parentName: "pre",
124
+ "className": "language-ts",
125
+ "metastring": "title=\"print-cmp-name-task.ts\"",
126
+ "title": "\"print-cmp-name-task.ts\""
127
+ }, "import { BuildTask, BuildContext, BuiltTaskResult, ComponentResult } from '@teambit/builder';\n\nexport class PrintCmpNameTask implements BuildTask {\n constructor(\n readonly aspectId: string,\n readonly name: string\n ) {}\n\n // Place the task at the end of the build pipeline\n readonly location = 'end';\n\n // Run this task only after the '@teambit/preview' task is completed successfully\n readonly dependencies = ['@teambit/preview'];\n\n async execute(context: BuildContext): Promise<BuiltTaskResult> {\n const componentsResults: ComponentResult[] = [];\n context.capsuleNetwork.seedersCapsules.forEach((capsule) => {\n console.log(`The current component name is: ${capsule.component.id.name}`);\n\n componentsResults.push({\n component: capsule.component,\n metadata: { customProp: capsule.component.id.name },\n });\n });\n return {\n componentsResults,\n };\n }\n}\n")), (0, _react2.mdx)("pre", null, (0, _react2.mdx)("code", {
128
+ parentName: "pre",
129
+ "className": "language-ts",
130
+ "metastring": "title=\"customized-react.extension.ts\"",
131
+ "title": "\"customized-react.extension.ts\""
132
+ }, "import { EnvsMain, EnvsAspect } from '@teambit/envs';\nimport { ReactAspect, ReactMain } from '@teambit/react';\nimport { BuilderMain } from '@teambit/builder';\n\n// Import the task (in reality, it should be an independent component)\nimport { PrintCmpNameTask } from './print-cmp-name-task';\n\nexport class CustomReact {\n constructor(private react: ReactMain) {}\n\n static dependencies: any = [EnvsAspect, ReactAspect];\n\n // Inject the builder\n static async provider([envs, react, builder]: [EnvsMain, ReactMain, BuilderMain]) {\n // Register this task using the registration slot, made available by the 'builder'.\n // Here, the environment has no say in the positioning of the task\n builder.registerBuildTasks([new ExampleTask('extensions/custom-react', 'PrintCmpNameTask')]);\n\n const customReactEnv = react.compose([]);\n\n envs.registerEnv(customReactEnv);\n return new CustomReact(react);\n }\n}\n")), (0, _react2.mdx)("h2", null, "A build task anatomy"), (0, _react2.mdx)("ul", null, (0, _react2.mdx)("li", {
133
+ parentName: "ul"
134
+ }, (0, _react2.mdx)("p", {
135
+ parentName: "li"
136
+ }, (0, _react2.mdx)("strong", {
137
+ parentName: "p"
138
+ }, "aspectId"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
139
+ parentName: "p"
140
+ }, "aspectId: string"), (0, _react2.mdx)("br", null), "\nThe component ID of the environment using this task.")), (0, _react2.mdx)("li", {
141
+ parentName: "ul"
142
+ }, (0, _react2.mdx)("p", {
143
+ parentName: "li"
144
+ }, (0, _react2.mdx)("strong", {
145
+ parentName: "p"
146
+ }, "name"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
147
+ parentName: "p"
148
+ }, "name: string"), " ", (0, _react2.mdx)("br", null), "\nA name for this task. Only alphanumerical characters are allowed. PascalCase should be used as a convention.")), (0, _react2.mdx)("li", {
149
+ parentName: "ul"
150
+ }, (0, _react2.mdx)("p", {
151
+ parentName: "li"
152
+ }, (0, _react2.mdx)("strong", {
153
+ parentName: "p"
154
+ }, "location"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
155
+ parentName: "p"
156
+ }, "location?: 'start' | 'end'"), " ", (0, _react2.mdx)("br", null), "\nThe section of the build-pipeline to which to append this task.")), (0, _react2.mdx)("li", {
157
+ parentName: "ul"
158
+ }, (0, _react2.mdx)("p", {
159
+ parentName: "li"
160
+ }, (0, _react2.mdx)("strong", {
161
+ parentName: "p"
162
+ }, "dependencies"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
163
+ parentName: "p"
164
+ }, "dependencies?: string[]"), " ", (0, _react2.mdx)("br", null), "\nAn list of tasks that must be completed before this task gets executed. ", (0, _react2.mdx)("br", null), "\nFor example ", (0, _react2.mdx)("inlineCode", {
165
+ parentName: "p"
166
+ }, "dependencies = ['@teambit/preview']"), ".")), (0, _react2.mdx)("li", {
167
+ parentName: "ul"
168
+ }, (0, _react2.mdx)("p", {
169
+ parentName: "li"
170
+ }, (0, _react2.mdx)("strong", {
171
+ parentName: "p"
172
+ }, "execute"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
173
+ parentName: "p"
174
+ }, "execute(context: BuildContext): Promise<BuiltTaskResult>"), " ", (0, _react2.mdx)("br", null), "\nThe execute method is where all the task logic is placed."), (0, _react2.mdx)("ul", {
175
+ parentName: "li"
176
+ }, (0, _react2.mdx)("li", {
177
+ parentName: "ul"
178
+ }, (0, _react2.mdx)("p", {
179
+ parentName: "li"
180
+ }, (0, _react2.mdx)("strong", {
181
+ parentName: "p"
182
+ }, "context"), " (argument) ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
183
+ parentName: "p"
184
+ }, "context: BuildContext"), " ", (0, _react2.mdx)("br", null), "\nThe context of the build pipeline. Use this object (provided by the build pipeline) to get information regarding all components handled by the build pipeline. ", (0, _react2.mdx)("br", null), (0, _react2.mdx)("br", null), "\nFor example, ", (0, _react2.mdx)("inlineCode", {
185
+ parentName: "p"
186
+ }, "context.capsuleNetwork.seedersCapsules"), " are models representing isolated instances of components handled by the build pipeline. These isolated instances are independent projects, generated in your local filesystem (by the build pipeline).")), (0, _react2.mdx)("li", {
187
+ parentName: "ul"
188
+ }, (0, _react2.mdx)("p", {
189
+ parentName: "li"
190
+ }, (0, _react2.mdx)("strong", {
191
+ parentName: "p"
192
+ }, "return"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
193
+ parentName: "p"
194
+ }, "Promise<BuiltTaskResult>"), " ", (0, _react2.mdx)("br", null), "\nA ", (0, _react2.mdx)("inlineCode", {
195
+ parentName: "p"
196
+ }, "context"), " method returns an object with data regarding the build task process, additional data regarding the components handled by the task and, if available, data regarding the different artifacts generated by this task.", (0, _react2.mdx)("br", null), "\nThe returned object has the following attributes:"), (0, _react2.mdx)("ul", {
197
+ parentName: "li"
198
+ }, (0, _react2.mdx)("li", {
199
+ parentName: "ul"
200
+ }, (0, _react2.mdx)("p", {
201
+ parentName: "li"
202
+ }, (0, _react2.mdx)("strong", {
203
+ parentName: "p"
204
+ }, "componentsResults"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
205
+ parentName: "p"
206
+ }, "componentsResults: ComponentResult[]"), "\nAn array of objects, each containing an instance of an object handled the task and additional information regarding the process and the component itself.")), (0, _react2.mdx)("li", {
207
+ parentName: "ul"
208
+ }, (0, _react2.mdx)("p", {
209
+ parentName: "li"
210
+ }, (0, _react2.mdx)("strong", {
211
+ parentName: "p"
212
+ }, "component"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
213
+ parentName: "p"
214
+ }, "component: Component"), " ", (0, _react2.mdx)("br", null), "\nAn instance of the component handled by the task (see the above task example).")), (0, _react2.mdx)("li", {
215
+ parentName: "ul"
216
+ }, (0, _react2.mdx)("p", {
217
+ parentName: "li"
218
+ }, (0, _react2.mdx)("strong", {
219
+ parentName: "p"
220
+ }, "metadata"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
221
+ parentName: "p"
222
+ }, "metadata?: { [key: string]: Serializable }"), " ", (0, _react2.mdx)("br", null), "\nComponent metadata generated during the build task.")), (0, _react2.mdx)("li", {
223
+ parentName: "ul"
224
+ }, (0, _react2.mdx)("p", {
225
+ parentName: "li"
226
+ }, (0, _react2.mdx)("strong", {
227
+ parentName: "p"
228
+ }, "errors"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
229
+ parentName: "p"
230
+ }, "errors?: Array<Error | string>"), " ", (0, _react2.mdx)("br", null), "\nBuild task errors. A task returning errors will abort the build pipeline and log the returned errors.")), (0, _react2.mdx)("li", {
231
+ parentName: "ul"
232
+ }, (0, _react2.mdx)("p", {
233
+ parentName: "li"
234
+ }, (0, _react2.mdx)("strong", {
235
+ parentName: "p"
236
+ }, "warnings"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
237
+ parentName: "p"
238
+ }, "warnings?: string[]"), " ", (0, _react2.mdx)("br", null), "\nwarnings generated throughout the build task.")), (0, _react2.mdx)("li", {
239
+ parentName: "ul"
240
+ }, (0, _react2.mdx)("p", {
241
+ parentName: "li"
242
+ }, (0, _react2.mdx)("strong", {
243
+ parentName: "p"
244
+ }, "startTime"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
245
+ parentName: "p"
246
+ }, "startTime?: number"), " ", (0, _react2.mdx)("br", null), "\nA timestamp (in milliseconds) of when the task started")), (0, _react2.mdx)("li", {
247
+ parentName: "ul"
248
+ }, (0, _react2.mdx)("p", {
249
+ parentName: "li"
250
+ }, (0, _react2.mdx)("strong", {
251
+ parentName: "p"
252
+ }, "endTime"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
253
+ parentName: "p"
254
+ }, "endTime?: number"), " ", (0, _react2.mdx)("br", null), "\nA timestamp (in milliseconds) of when the task ended")), (0, _react2.mdx)("li", {
255
+ parentName: "ul"
256
+ }, (0, _react2.mdx)("p", {
257
+ parentName: "li"
258
+ }, (0, _react2.mdx)("strong", {
259
+ parentName: "p"
260
+ }, "artifacts"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
261
+ parentName: "p"
262
+ }, "artifacts?: ArtifactDefinition[]"), " ", (0, _react2.mdx)("br", null), "\nAn array of artifact definitions to generate after a successful build")), (0, _react2.mdx)("li", {
263
+ parentName: "ul"
264
+ }, (0, _react2.mdx)("p", {
265
+ parentName: "li"
266
+ }, (0, _react2.mdx)("strong", {
267
+ parentName: "p"
268
+ }, "name"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
269
+ parentName: "p"
270
+ }, "name: string"), " ", (0, _react2.mdx)("br", null), "\nThe name of the artifact. ", (0, _react2.mdx)("br", null), "\nFor example, a project might utilize two different artifacts for the same typescript compiler, one that generates ES5 files and another for ES6. This prop helps to distinguish between the two.")), (0, _react2.mdx)("li", {
271
+ parentName: "ul"
272
+ }, (0, _react2.mdx)("p", {
273
+ parentName: "li"
274
+ }, (0, _react2.mdx)("strong", {
275
+ parentName: "p"
276
+ }, "generatedBy"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
277
+ parentName: "p"
278
+ }, "generatedBy?: string;"), " ", (0, _react2.mdx)("br", null), "\nId of the component that generated this artifact.")), (0, _react2.mdx)("li", {
279
+ parentName: "ul"
280
+ }, (0, _react2.mdx)("p", {
281
+ parentName: "li"
282
+ }, (0, _react2.mdx)("strong", {
283
+ parentName: "p"
284
+ }, "description"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
285
+ parentName: "p"
286
+ }, "description?: string"), " ", (0, _react2.mdx)("br", null), "\nA description of the artifact. ", (0, _react2.mdx)("br", null))), (0, _react2.mdx)("li", {
287
+ parentName: "ul"
288
+ }, (0, _react2.mdx)("p", {
289
+ parentName: "li"
290
+ }, (0, _react2.mdx)("strong", {
291
+ parentName: "p"
292
+ }, "globPatterns"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
293
+ parentName: "p"
294
+ }, "globPatterns: string[]"), " ", (0, _react2.mdx)("br", null), "\nGlob patterns of files to include upon artifact creation. Minimatch is used to match the patterns. ", (0, _react2.mdx)("br", null), "\nFor example, ", (0, _react2.mdx)("inlineCode", {
295
+ parentName: "p"
296
+ }, "['*.ts', '!foo.ts']"), " matches all ts files but ignores ", (0, _react2.mdx)("inlineCode", {
297
+ parentName: "p"
298
+ }, "foo.ts"), ".")), (0, _react2.mdx)("li", {
299
+ parentName: "ul"
300
+ }, (0, _react2.mdx)("p", {
301
+ parentName: "li"
302
+ }, (0, _react2.mdx)("strong", {
303
+ parentName: "p"
304
+ }, "rootDir"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
305
+ parentName: "p"
306
+ }, "rootDir?: string"), " ", (0, _react2.mdx)("br", null), "\nDefines the root directory of the artifacts in the capsule file system. The rootDir must be unique for every artifact, otherwise data might be overridden.")), (0, _react2.mdx)("li", {
307
+ parentName: "ul"
308
+ }, (0, _react2.mdx)("p", {
309
+ parentName: "li"
310
+ }, (0, _react2.mdx)("strong", {
311
+ parentName: "p"
312
+ }, "dirPrefix"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
313
+ parentName: "p"
314
+ }, "dirPrefix?: string"), " ", (0, _react2.mdx)("br", null), "\nAdds a directory prefix for all artifact files.")), (0, _react2.mdx)("li", {
315
+ parentName: "ul"
316
+ }, (0, _react2.mdx)("p", {
317
+ parentName: "li"
318
+ }, (0, _react2.mdx)("strong", {
319
+ parentName: "p"
320
+ }, "context"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
321
+ parentName: "p"
322
+ }, "context?: 'component' | 'env'"), " ", (0, _react2.mdx)("br", null), "\nDetermine the context of the artifact. The default artifact context is ", (0, _react2.mdx)("inlineCode", {
323
+ parentName: "p"
324
+ }, "component"), ". ", (0, _react2.mdx)("inlineCode", {
325
+ parentName: "p"
326
+ }, "env"), " is useful when the same file is generated for all components, for example, a \"preview\" task may create the same webpack file for all components of that env.")), (0, _react2.mdx)("li", {
327
+ parentName: "ul"
328
+ }, (0, _react2.mdx)("p", {
329
+ parentName: "li"
330
+ }, (0, _react2.mdx)("strong", {
331
+ parentName: "p"
332
+ }, "storageResolver"), " ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
333
+ parentName: "p"
334
+ }, "storageResolver?: string"), " ", (0, _react2.mdx)("br", null), "\nUsed to replace the location of the stored artifacts. The default resolver persists artifacts on scope (that's not recommended for large files).")))))), (0, _react2.mdx)("li", {
335
+ parentName: "ul"
336
+ }, (0, _react2.mdx)("p", {
337
+ parentName: "li"
338
+ }, (0, _react2.mdx)("strong", {
339
+ parentName: "p"
340
+ }, "preBuild"), " (advanced) ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
341
+ parentName: "p"
342
+ }, "preBuild?(context: BuildContext): Promise<void>"), " ", (0, _react2.mdx)("br", null), "\nRuns before the build pipeline has started. This method should only be used when preparations are needed to be done on all environments before the build starts.")), (0, _react2.mdx)("li", {
343
+ parentName: "ul"
344
+ }, (0, _react2.mdx)("p", {
345
+ parentName: "li"
346
+ }, (0, _react2.mdx)("strong", {
347
+ parentName: "p"
348
+ }, "postBuild"), " (advanced) ", (0, _react2.mdx)("br", null), "\n", (0, _react2.mdx)("inlineCode", {
349
+ parentName: "p"
350
+ }, "postBuild?(context: BuildContext, tasksResults: TaskResultsList): Promise<void>"), " ", (0, _react2.mdx)("br", null), "\nRuns after the dependencies were completed for all environments."))));
351
+ }
352
+ ;
353
+ MDXContent.isMDXComponent = true;
354
+
355
+ //# sourceMappingURL=builder.mdx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_react2","_excluded","e","__esModule","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","_objectWithoutProperties","o","i","_objectWithoutPropertiesLoose","getOwnPropertySymbols","indexOf","propertyIsEnumerable","layoutProps","MDXLayout","MDXContent","_ref","components","props","mdx","mdxType","parentName","isMDXComponent"],"sourceRoot":"/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.pipelines_aspect-docs_builder@02c7dcca80975692ca58bea9be10f787b9ea26ca","sources":["builder.mdx.js"],"sourcesContent":["\n// @ts-nocheck\nimport React from 'react'\nimport { mdx } from '@mdx-js/react'\n\n/* @jsxRuntime classic */\n/* @jsx mdx */\n\n\n\n\nconst layoutProps = {\n \n};\nconst MDXLayout = \"wrapper\"\nexport default function MDXContent({\n components,\n ...props\n}) {\n return <MDXLayout {...layoutProps} {...props} components={components} mdxType=\"MDXLayout\">\n <h2>{`Background`}</h2>\n <p>{`Bit's build process is an extensible CI for independent components. It validates a component is not dependent on its context (the workspace), tests it, and generates all artifacts necessary for it to be viewed and consumed as an independent module (its distributable code, bundled preview, etc.).`}</p>\n <p>{`The Build Pipeline is an Environment Service responsible for sequencing and executing a component's Build Tasks. As mentioned earlier, these tasks are performed on a component only after it's been isolated from the rest of the workspace.`}</p>\n <p>{`A component's default series of Build Tasks is composed of tasks set by Bit and by its environment.`}</p>\n <h2>{`Isolated builds`}</h2>\n <p>{`Components authored in a Bit workspace are created to be completely portable, and thus independent. To address that, the build process starts by creating a component 'capsule' which is an isolated instance of a component, generated in a separate directory in your filesystem.`}</p>\n <p>{`As part of the capsule creation, all packages listed as dependencies of that component will be installed. This step is necessary to validate there are no dependency-graph issues (a component that is not totally isolated will be able to use packages installed in parent directories in your workspace, by other components. This will translate into a \"false positive\" result when testing for dependency-graph issues in a non-isolated location).`}</p>\n <h2>{`Incremental builds`}</h2>\n <p>{`When a component \"goes through\" the build pipeline, all of its dependencies are built as well. If a dependency has not changed since its last build, the build process will use its artifacts from the previous build (and will not process it again). This optimization to the build process supplements the \"innate optimization\" that naturally comes from developing (and building) independent components instead of a single monolithic codebase.`}</p>\n <h2>{`Environment-specific builds`}</h2>\n <p>{`Each Bit environment determines its own build pipeline. That means, a single workspace that uses multiple environments will run a different set of build tasks on different components depending on their associated environment. This is another Bit feature that enables seamless transitioning between different development environments, all in the same workspace. It also makes it much easier to integrate the Build Pipeline in your (remote) CI, as it only requires executing the build step - all other per-component build configurations are already set by the various environments being used.`}</p>\n <p>{`Since environments are extensible, so are the build pipelines configured by them.`}</p>\n <h2>{`Build task`}</h2>\n <p>{`An example of a build-task is `}<inlineCode parentName=\"p\">{`compile`}</inlineCode>{`, it's written in the compiler aspect and is running on each one of the capsules created by the build process. build-tasks in many cases generate artifacts, in this case, the compiler generates `}<inlineCode parentName=\"p\">{`dists`}</inlineCode>{` files and write them on the isolated capsules. There artifacts files are used later for example when creating packages.`}</p>\n <h2>{`Pipelines`}</h2>\n <p>{`There are three pipelines: `}<inlineCode parentName=\"p\">{`build`}</inlineCode>{`, `}<inlineCode parentName=\"p\">{`tag`}</inlineCode>{` and `}<inlineCode parentName=\"p\">{`snap`}</inlineCode>{`.`}</p>\n <ul>\n <li parentName=\"ul\"><inlineCode parentName=\"li\">{`bit build`}</inlineCode>{` runs the build pipeline.`}</li>\n <li parentName=\"ul\"><inlineCode parentName=\"li\">{`bit tag`}</inlineCode>{` runs the build pipeline and then the tag pipeline.`}</li>\n <li parentName=\"ul\"><inlineCode parentName=\"li\">{`bit snap`}</inlineCode>{` runs the build pipeline and then the snap pipeline.`}</li>\n </ul>\n <h2>{`List Build Tasks`}</h2>\n <p>{`To get a list of all the tasks that will be running per pipeline on a specific component, run `}<inlineCode parentName=\"p\">{`bit build --list-tasks <id>`}</inlineCode>{`.\nHere is an example of the relevant part from the output:`}</p>\n <pre><code parentName=\"pre\" {...{}}>{`➜ bit build --list-tasks ui/tooltip\nTasks List\nid: teambit.design/ui/tooltip@0.0.347\nenvId: teambit.react/react\n\nBuild Pipeline Tasks:\nteambit.harmony/aspect:CoreExporter\nteambit.compilation/compiler:TSCompiler\nteambit.defender/tester:TestComponents\nteambit.pkg/pkg:PreparePackages\nteambit.pkg/pkg:PublishDryRun\nteambit.preview/preview:GeneratePreview\n\nTag Pipeline Tasks:\nteambit.harmony/application:build_ui_application\nteambit.pkg/pkg:PublishComponents\n\nSnap Pipeline Tasks:\n<N/A>\n`}</code></pre>\n <h2>{`Implementing Build Tasks`}</h2>\n <p>{`The `}<inlineCode parentName=\"p\">{`BuildTask`}</inlineCode>{` interface is a good start to understand how to implement a new build-task.\nWhen writing a build task, the `}<inlineCode parentName=\"p\">{`Network`}</inlineCode>{` object is passed and it includes the seeders capsules, as well as the entire graph including the dependencies.\nKeep in mind that the entire graph may contain components from other envs.`}</p>\n <p>{`Some tasks, such as, compiling in typescript and bundling with Webpack, need the entire graph.\nOthers, such as, Babel, need only the seeders. However, normally, the bundling is running after the compilation and it expects to have the dependencies compiled, so you might need the entire graph regardless.`}</p>\n <h2>{`Adding Tasks to a pipeline`}</h2>\n <p>{`There are two ways of adding tasks to the build pipeline.`}</p>\n <ol>\n <li parentName=\"ol\"><inlineCode parentName=\"li\">{`getBuildPipe()`}</inlineCode>{` method of the env. (or `}<inlineCode parentName=\"li\">{`getTagPipe()`}</inlineCode>{` and `}<inlineCode parentName=\"li\">{`getSnapPipe()`}</inlineCode>{`)`}</li>\n <li parentName=\"ol\">{`registering to the slot via `}<inlineCode parentName=\"li\">{`builder.registerBuildTask()`}</inlineCode>{`. (or `}<inlineCode parentName=\"li\">{`registerTagTask()`}</inlineCode>{` and `}<inlineCode parentName=\"li\">{`registerSnapTask()`}</inlineCode>{`)`}</li>\n </ol>\n <p>{`in the option #1, it's possible to determine the order. e.g. `}<inlineCode parentName=\"p\">{`getBuildPipe() { return [taskA, taskB, taskC]; }`}</inlineCode>{`\nin the option #2, the register happens once the extension is loaded, so there is no way to put\none task before/after another task as of now.`}</p>\n <h2>{`Sequencing the build tasks`}</h2>\n <p>{`The Build Pipeline takes into consideration the following factors when deciding the order of which to execute each task:`}</p>\n <ul>\n <li parentName=\"ul\"><strong parentName=\"li\">{`Location`}</strong>{`: A task can be executed either at the start or end of the build pipeline. This can be explicitly configured by the task itself.`}</li>\n <li parentName=\"ul\"><strong parentName=\"li\">{`Dependencies`}</strong>{`: A task can depend on other tasks. That means, the dependencies must be completed successfully for all envs before this task starts. The dependencies are applicable inside a location and not across locations. This is configured by the task itself.`}</li>\n <li parentName=\"ul\"><strong parentName=\"li\">{`An environment's list of build tasks`}</strong>{`: This is the array of tasks as it is defined by an environment`}</li>\n </ul>\n <h2>{`Executing the pipelines`}</h2>\n <p>{`Commands that trigger the build pipeline:`}</p>\n <ul>\n <li parentName=\"ul\"><inlineCode parentName=\"li\">{`bit build`}</inlineCode>{` - runs the build pipeline on your local machine, for the entire workspace. The output data will not persist. - That is most often used for testing and debugging the build process.`}</li>\n <li parentName=\"ul\"><inlineCode parentName=\"li\">{`bit tag`}</inlineCode>{` - runs the tag pipeline in addition to the build pipeline, before creating a new component release version. The output data will persist.`}</li>\n <li parentName=\"ul\"><inlineCode parentName=\"li\">{`bit snap`}</inlineCode>{` - runs the snap pipeline in addition to the build pipeline. The output data will persist.`}</li>\n </ul>\n <p>{`Build pipelines are determined by the environments in use. That means, in order to override the default pipeline, we need to create a new environment extension or modify an existing one.`}</p>\n <p>{`The example task below, shown being used by a customized environment, prints out the component name of every component handled by it. In addition to that, the task returns the component name as custom metadata to be logged and/or stored in the component tagged version. `}<a parentName=\"p\" {...{\n \"href\": \"https://github.com/teambit/harmony-build-examples\"\n }}>{`See a demo project here`}</a>{`.`}</p>\n <blockquote>\n <p parentName=\"blockquote\">{`Information returned by a build task will only persist if the build-pipeline was triggered by the 'hard-tag' command (`}<inlineCode parentName=\"p\">{`bit tag <component-id>`}</inlineCode>{`).`}</p>\n </blockquote>\n <pre><code parentName=\"pre\" {...{\n \"className\": \"language-ts\",\n \"metastring\": \"title=\\\"print-cmp-name-task.ts\\\"\",\n \"title\": \"\\\"print-cmp-name-task.ts\\\"\"\n }}>{`import { BuildTask, BuildContext, BuiltTaskResult, ComponentResult } from '@teambit/builder';\n\n// A task is an implementation of 'BuildTask' provided by the 'builder' aspect\nexport class PrintCmpNameTask implements BuildTask {\n // The constructor leaves these properties up to the hands of the environment using this task\n constructor(\n readonly aspectId: string,\n readonly name: string\n ) {}\n\n // This is where the task logic is placed. It will be executed by the build pipeline\n async execute(context: BuildContext): Promise<BuiltTaskResult> {\n const componentsResults: ComponentResult[] = [];\n\n // Go through every isolated component instance\n context.capsuleNetwork.seedersCapsules.forEach((capsule) => {\n console.log(\\`The current component name is: \\${capsule.component.id.name}\\`);\n\n componentsResults.push({\n component: capsule.component,\n metadata: { customProp: capsule.component.id.name },\n });\n });\n return {\n // An array of component objects, enriched with additional data produced by the task\n componentsResults,\n };\n }\n}\n`}</code></pre>\n <pre><code parentName=\"pre\" {...{\n \"className\": \"language-ts\",\n \"metastring\": \"title=\\\"customized-react.extension.ts\\\"\",\n \"title\": \"\\\"customized-react.extension.ts\\\"\"\n }}>{`import { EnvsMain, EnvsAspect } from '@teambit/envs';\nimport { ReactAspect, ReactMain } from '@teambit/react';\n\n// Import the task\nimport { PrintCmpNameTask } from './print-cmp-name-task';\n\nexport class CustomReact {\n constructor(private react: ReactMain) {}\n\n static dependencies: any = [EnvsAspect, ReactAspect];\n\n static async provider([envs, react]: [EnvsMain, ReactMain]) {\n // Get the environment's default build pipeline\n const reactPipe = react.env.getBuildPipe();\n\n // Add the custom task to the end of the build tasks sequence.\n // Provide the task with the component ID of the extension using it.\n // Provide the ask with a name.\n const tasks = [...reactPipe, new PrintCompTask('extensions/custom-react', 'PrintCmpNameTask')];\n\n // Create a new environment by merging these configurations with the env's default ones\n const customReactEnv = react.compose([react.overrideBuildPipe(tasks)]);\n\n // register the extension as an environment\n envs.registerEnv(customReactEnv);\n return new CustomReact(react);\n }\n}\n`}</code></pre>\n <h2>{`Positioning a build task in the pipeline`}</h2>\n <p>{`A build task is positioned in the build pipeline sequence either by overriding the entire `}<em parentName=\"p\">{`customizable`}</em>{` pipeline or, by registering it to a location in the pipeline using the designated builder slot.`}</p>\n <h3>{`Override the build pipeline sequence`}</h3>\n <p>{`This methodology leaves the task completely agnostic as to its position in the build pipeline. Instead, the task position is determined by the environment using the `}<inlineCode parentName=\"p\">{`getBuildPipe`}</inlineCode>{` Environment Handler.`}</p>\n <p>{`The example above shows the React environment `}<inlineCode parentName=\"p\">{`overrideBuildPipe`}</inlineCode>{` method being used to override its default pipeline. This method uses the `}<inlineCode parentName=\"p\">{`getBuildPipe()`}</inlineCode>{` Environment Handler, internally.`}</p>\n <h3>{`Append to the start or end of the pipeline, in relation to other tasks`}</h3>\n <p>{`This methodology places the task at the start or end of the build pipeline sequence, and lists all other tasks needed to run successfully before it is executed.`}</p>\n <p>{`Example:`}</p>\n <pre><code parentName=\"pre\" {...{\n \"className\": \"language-ts\",\n \"metastring\": \"title=\\\"print-cmp-name-task.ts\\\"\",\n \"title\": \"\\\"print-cmp-name-task.ts\\\"\"\n }}>{`import { BuildTask, BuildContext, BuiltTaskResult, ComponentResult } from '@teambit/builder';\n\nexport class PrintCmpNameTask implements BuildTask {\n constructor(\n readonly aspectId: string,\n readonly name: string\n ) {}\n\n // Place the task at the end of the build pipeline\n readonly location = 'end';\n\n // Run this task only after the '@teambit/preview' task is completed successfully\n readonly dependencies = ['@teambit/preview'];\n\n async execute(context: BuildContext): Promise<BuiltTaskResult> {\n const componentsResults: ComponentResult[] = [];\n context.capsuleNetwork.seedersCapsules.forEach((capsule) => {\n console.log(\\`The current component name is: \\${capsule.component.id.name}\\`);\n\n componentsResults.push({\n component: capsule.component,\n metadata: { customProp: capsule.component.id.name },\n });\n });\n return {\n componentsResults,\n };\n }\n}\n`}</code></pre>\n <pre><code parentName=\"pre\" {...{\n \"className\": \"language-ts\",\n \"metastring\": \"title=\\\"customized-react.extension.ts\\\"\",\n \"title\": \"\\\"customized-react.extension.ts\\\"\"\n }}>{`import { EnvsMain, EnvsAspect } from '@teambit/envs';\nimport { ReactAspect, ReactMain } from '@teambit/react';\nimport { BuilderMain } from '@teambit/builder';\n\n// Import the task (in reality, it should be an independent component)\nimport { PrintCmpNameTask } from './print-cmp-name-task';\n\nexport class CustomReact {\n constructor(private react: ReactMain) {}\n\n static dependencies: any = [EnvsAspect, ReactAspect];\n\n // Inject the builder\n static async provider([envs, react, builder]: [EnvsMain, ReactMain, BuilderMain]) {\n // Register this task using the registration slot, made available by the 'builder'.\n // Here, the environment has no say in the positioning of the task\n builder.registerBuildTasks([new ExampleTask('extensions/custom-react', 'PrintCmpNameTask')]);\n\n const customReactEnv = react.compose([]);\n\n envs.registerEnv(customReactEnv);\n return new CustomReact(react);\n }\n}\n`}</code></pre>\n <h2>{`A build task anatomy`}</h2>\n <ul>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`aspectId`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`aspectId: string`}</inlineCode><br />{`\nThe component ID of the environment using this task.`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`name`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`name: string`}</inlineCode>{` `}<br />{`\nA name for this task. Only alphanumerical characters are allowed. PascalCase should be used as a convention.`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`location`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`location?: 'start' | 'end'`}</inlineCode>{` `}<br />{`\nThe section of the build-pipeline to which to append this task.`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`dependencies`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`dependencies?: string[]`}</inlineCode>{` `}<br />{`\nAn list of tasks that must be completed before this task gets executed. `}<br />{`\nFor example `}<inlineCode parentName=\"p\">{`dependencies = ['@teambit/preview']`}</inlineCode>{`.`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`execute`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`execute(context: BuildContext): Promise<BuiltTaskResult>`}</inlineCode>{` `}<br />{`\nThe execute method is where all the task logic is placed.`}</p>\n <ul parentName=\"li\">\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`context`}</strong>{` (argument) `}<br />{`\n`}<inlineCode parentName=\"p\">{`context: BuildContext`}</inlineCode>{` `}<br />{`\nThe context of the build pipeline. Use this object (provided by the build pipeline) to get information regarding all components handled by the build pipeline. `}<br /><br />{`\nFor example, `}<inlineCode parentName=\"p\">{`context.capsuleNetwork.seedersCapsules`}</inlineCode>{` are models representing isolated instances of components handled by the build pipeline. These isolated instances are independent projects, generated in your local filesystem (by the build pipeline).`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`return`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`Promise<BuiltTaskResult>`}</inlineCode>{` `}<br />{`\nA `}<inlineCode parentName=\"p\">{`context`}</inlineCode>{` method returns an object with data regarding the build task process, additional data regarding the components handled by the task and, if available, data regarding the different artifacts generated by this task.`}<br />{`\nThe returned object has the following attributes:`}</p>\n <ul parentName=\"li\">\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`componentsResults`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`componentsResults: ComponentResult[]`}</inlineCode>{`\nAn array of objects, each containing an instance of an object handled the task and additional information regarding the process and the component itself.`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`component`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`component: Component`}</inlineCode>{` `}<br />{`\nAn instance of the component handled by the task (see the above task example).`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`metadata`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`metadata?: { [key: string]: Serializable }`}</inlineCode>{` `}<br />{`\nComponent metadata generated during the build task.`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`errors`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`errors?: Array<Error | string>`}</inlineCode>{` `}<br />{`\nBuild task errors. A task returning errors will abort the build pipeline and log the returned errors.`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`warnings`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`warnings?: string[]`}</inlineCode>{` `}<br />{`\nwarnings generated throughout the build task.`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`startTime`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`startTime?: number`}</inlineCode>{` `}<br />{`\nA timestamp (in milliseconds) of when the task started`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`endTime`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`endTime?: number`}</inlineCode>{` `}<br />{`\nA timestamp (in milliseconds) of when the task ended`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`artifacts`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`artifacts?: ArtifactDefinition[]`}</inlineCode>{` `}<br />{`\nAn array of artifact definitions to generate after a successful build`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`name`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`name: string`}</inlineCode>{` `}<br />{`\nThe name of the artifact. `}<br />{`\nFor example, a project might utilize two different artifacts for the same typescript compiler, one that generates ES5 files and another for ES6. This prop helps to distinguish between the two.`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`generatedBy`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`generatedBy?: string;`}</inlineCode>{` `}<br />{`\nId of the component that generated this artifact.`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`description`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`description?: string`}</inlineCode>{` `}<br />{`\nA description of the artifact. `}<br /></p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`globPatterns`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`globPatterns: string[]`}</inlineCode>{` `}<br />{`\nGlob patterns of files to include upon artifact creation. Minimatch is used to match the patterns. `}<br />{`\nFor example, `}<inlineCode parentName=\"p\">{`['*.ts', '!foo.ts']`}</inlineCode>{` matches all ts files but ignores `}<inlineCode parentName=\"p\">{`foo.ts`}</inlineCode>{`.`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`rootDir`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`rootDir?: string`}</inlineCode>{` `}<br />{`\nDefines the root directory of the artifacts in the capsule file system. The rootDir must be unique for every artifact, otherwise data might be overridden.`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`dirPrefix`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`dirPrefix?: string`}</inlineCode>{` `}<br />{`\nAdds a directory prefix for all artifact files.`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`context`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`context?: 'component' | 'env'`}</inlineCode>{` `}<br />{`\nDetermine the context of the artifact. The default artifact context is `}<inlineCode parentName=\"p\">{`component`}</inlineCode>{`. `}<inlineCode parentName=\"p\">{`env`}</inlineCode>{` is useful when the same file is generated for all components, for example, a \"preview\" task may create the same webpack file for all components of that env.`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`storageResolver`}</strong>{` `}<br />{`\n`}<inlineCode parentName=\"p\">{`storageResolver?: string`}</inlineCode>{` `}<br />{`\nUsed to replace the location of the stored artifacts. The default resolver persists artifacts on scope (that's not recommended for large files).`}</p>\n </li>\n </ul>\n </li>\n </ul>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`preBuild`}</strong>{` (advanced) `}<br />{`\n`}<inlineCode parentName=\"p\">{`preBuild?(context: BuildContext): Promise<void>`}</inlineCode>{` `}<br />{`\nRuns before the build pipeline has started. This method should only be used when preparations are needed to be done on all environments before the build starts.`}</p>\n </li>\n <li parentName=\"ul\">\n <p parentName=\"li\"><strong parentName=\"p\">{`postBuild`}</strong>{` (advanced) `}<br />{`\n`}<inlineCode parentName=\"p\">{`postBuild?(context: BuildContext, tasksResults: TaskResultsList): Promise<void>`}</inlineCode>{` `}<br />{`\nRuns after the dependencies were completed for all environments.`}</p>\n </li>\n </ul>\n </MDXLayout>;\n}\n;\nMDXContent.isMDXComponent = true;"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAAmC,IAAAE,SAAA,mBAFnC;AAAA,SAAAH,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,gBAAAA,CAAA;AAAA,SAAAE,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAN,CAAA,MAAAA,CAAA,GAAAO,SAAA,CAAAC,MAAA,EAAAR,CAAA,UAAAS,CAAA,GAAAF,SAAA,CAAAP,CAAA,YAAAU,CAAA,IAAAD,CAAA,OAAAE,cAAA,CAAAC,IAAA,CAAAH,CAAA,EAAAC,CAAA,MAAAJ,CAAA,CAAAI,CAAA,IAAAD,CAAA,CAAAC,CAAA,aAAAJ,CAAA,KAAAJ,QAAA,CAAAW,KAAA,OAAAN,SAAA;AAAA,SAAAO,yBAAAd,CAAA,EAAAS,CAAA,gBAAAT,CAAA,iBAAAe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,GAAA;IAAYE,UAAU,EAAC;EAAG,oDAAgE,CAAC,OAAK,IAAA/B,OAAA,CAAA6B,GAAA,YAAK,CAAC,sKAC6D,CAC3J,CAAC,EACL,IAAA7B,OAAA,CAAA6B,GAAA;IAAIE,UAAU,EAAC;EAAI,GACjB,IAAA/B,OAAA,CAAA6B,GAAA;IAAGE,UAAU,EAAC;EAAI,GAAC,IAAA/B,OAAA,CAAA6B,GAAA;IAAQE,UAAU,EAAC;EAAG,cAAsB,CAAC,kBAAgB,IAAA/B,OAAA,CAAA6B,GAAA,YAAK,CAAC,QAC5F,IAAA7B,OAAA,CAAA6B,GAAA;IAAYE,UAAU,EAAC;EAAG,oFAAgG,CAAC,OAAK,IAAA/B,OAAA,CAAA6B,GAAA,YAAK,CAAC,sEACnE,CAC3D,CACF,CACO,CAAC;AAChB;AACA;AACAJ,UAAU,CAACO,cAAc,GAAG,IAAI","ignoreList":[]}
@@ -0,0 +1 @@
1
+ export { default as Builder } from './builder.mdx';
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Builder = void 0;
7
+ var builder_mdx_1 = require("./builder.mdx");
8
+ Object.defineProperty(exports, "Builder", { enumerable: true, get: function () { return __importDefault(builder_mdx_1).default; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;AAAA,6CAAmD;AAA1C,uHAAA,OAAO,OAAW"}
@@ -0,0 +1,7 @@
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.pipelines_aspect-docs_builder@02c7dcca80975692ca58bea9be10f787b9ea26ca/dist/builder.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.pipelines_aspect-docs_builder@02c7dcca80975692ca58bea9be10f787b9ea26ca/dist/builder.docs.mdx';
3
+
4
+ export const compositions = [compositions_0];
5
+ export const overview = [overview_0];
6
+
7
+ export const compositions_metadata = {"compositions":[{"displayName":"Builder docs","identifier":"BuilderDocs"}]};
package/index.ts ADDED
@@ -0,0 +1 @@
1
+ export { default as Builder } from './builder.mdx';
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@teambit/pipelines.aspect-docs.builder",
3
+ "version": "0.0.0-02c7dcca80975692ca58bea9be10f787b9ea26ca",
4
+ "homepage": "https://bit.cloud/teambit/pipelines/aspect-docs/builder",
5
+ "main": "dist/index.js",
6
+ "componentId": {
7
+ "scope": "teambit.pipelines",
8
+ "name": "aspect-docs/builder",
9
+ "version": "02c7dcca80975692ca58bea9be10f787b9ea26ca"
10
+ },
11
+ "dependencies": {
12
+ "core-js": "^3.0.0",
13
+ "@mdx-js/react": "1.6.22",
14
+ "@teambit/mdx.ui.mdx-scope-context": "1.0.0"
15
+ },
16
+ "devDependencies": {
17
+ "@types/react": "^17.0.8",
18
+ "@types/mocha": "9.1.0",
19
+ "@types/node": "12.20.4",
20
+ "@types/react-dom": "^17.0.5",
21
+ "@types/jest": "^26.0.0",
22
+ "@babel/runtime": "7.20.0",
23
+ "@types/testing-library__jest-dom": "5.9.5",
24
+ "@teambit/documenter.theme.theme-compositions": "4.1.5",
25
+ "@teambit/mdx.ui.mdx-layout": "1.0.12"
26
+ },
27
+ "peerDependencies": {
28
+ "react": "^16.8.0 || ^17.0.0",
29
+ "react-dom": "^16.8.0 || ^17.0.0"
30
+ },
31
+ "license": "Apache-2.0",
32
+ "optionalDependencies": {},
33
+ "peerDependenciesMeta": {},
34
+ "private": false,
35
+ "engines": {
36
+ "node": ">=12.22.0"
37
+ },
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "https://github.com/teambit/bit"
41
+ },
42
+ "keywords": [
43
+ "bit",
44
+ "components",
45
+ "collaboration",
46
+ "web",
47
+ "react",
48
+ "react-components",
49
+ "angular",
50
+ "angular-components"
51
+ ]
52
+ }
@@ -0,0 +1,29 @@
1
+ declare module '*.png' {
2
+ const value: any;
3
+ export = value;
4
+ }
5
+ declare module '*.svg' {
6
+ import type { FunctionComponent, SVGProps } from 'react';
7
+
8
+ export const ReactComponent: FunctionComponent<SVGProps<SVGSVGElement> & { title?: string }>;
9
+ const src: string;
10
+ export default src;
11
+ }
12
+
13
+ // @TODO Gilad
14
+ declare module '*.jpg' {
15
+ const value: any;
16
+ export = value;
17
+ }
18
+ declare module '*.jpeg' {
19
+ const value: any;
20
+ export = value;
21
+ }
22
+ declare module '*.gif' {
23
+ const value: any;
24
+ export = value;
25
+ }
26
+ declare module '*.bmp' {
27
+ const value: any;
28
+ export = value;
29
+ }
@@ -0,0 +1,42 @@
1
+ declare module '*.module.css' {
2
+ const classes: { readonly [key: string]: string };
3
+ export default classes;
4
+ }
5
+ declare module '*.module.scss' {
6
+ const classes: { readonly [key: string]: string };
7
+ export default classes;
8
+ }
9
+ declare module '*.module.sass' {
10
+ const classes: { readonly [key: string]: string };
11
+ export default classes;
12
+ }
13
+
14
+ declare module '*.module.less' {
15
+ const classes: { readonly [key: string]: string };
16
+ export default classes;
17
+ }
18
+
19
+ declare module '*.less' {
20
+ const classes: { readonly [key: string]: string };
21
+ export default classes;
22
+ }
23
+
24
+ declare module '*.css' {
25
+ const classes: { readonly [key: string]: string };
26
+ export default classes;
27
+ }
28
+
29
+ declare module '*.sass' {
30
+ const classes: { readonly [key: string]: string };
31
+ export default classes;
32
+ }
33
+
34
+ declare module '*.scss' {
35
+ const classes: { readonly [key: string]: string };
36
+ export default classes;
37
+ }
38
+
39
+ declare module '*.mdx' {
40
+ const component: any;
41
+ export default component;
42
+ }