Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

New docs #246

Draft
wants to merge 218 commits into
base: harmony
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
218 commits
Select commit Hold shift + click to select a range
46b75ec
add files and directories
giteden Jul 16, 2021
77cbf92
create new sidebar
giteden Jul 17, 2021
1284d0b
add content. add zoom to Image component.
giteden Jul 18, 2021
3bcb14f
add content
giteden Jul 19, 2021
d7465cd
add content
giteden Jul 20, 2021
1ca4294
add content.
giteden Jul 20, 2021
7b1f34c
add content
giteden Jul 20, 2021
efb3a7a
add content
giteden Jul 25, 2021
0223a52
add content.
giteden Jul 25, 2021
5534a26
add content.
giteden Jul 26, 2021
e297322
changes
ranm8 Jul 29, 2021
1c63fdb
Merge branch 'new-home-bit' of github.com:teambit/docs into new-home-bit
ranm8 Jul 30, 2021
ced0dea
pair programming with Ran
debs-obrien Jul 30, 2021
c55dd5b
more changes
ranm8 Aug 1, 2021
088bd49
minor improvements
debs-obrien Aug 1, 2021
ec26b33
for itay
ranm8 Aug 2, 2021
b1741ab
Merge branch 'many-changes' of github.com:teambit/docs into many-changes
ranm8 Aug 2, 2021
d64ad7c
mfes
itaymendel Aug 2, 2021
285bc38
changes
ranm8 Aug 2, 2021
492cd75
image
ranm8 Aug 2, 2021
464c4fb
quick start improvements
debs-obrien Aug 3, 2021
9b67c9f
skeleton done
itaymendel Aug 3, 2021
626f2e8
Merge branch 'many-changes' of github.com:teambit/docs into many-changes
itaymendel Aug 3, 2021
787c0f0
add install bit and create workspace
debs-obrien Aug 4, 2021
8bf0d24
adding in-practice
itaymendel Aug 4, 2021
e34c039
Merge branch 'many-changes' of github.com:teambit/docs into many-changes
itaymendel Aug 4, 2021
11757bf
changes
ranm8 Aug 4, 2021
97e1a2c
changes
ranm8 Aug 4, 2021
f555417
fixed
ranm8 Aug 4, 2021
2ea6052
minor additon to create components
debs-obrien Aug 4, 2021
71f0e6c
add tester overview and ws testing
giteden Aug 4, 2021
c27b973
Merge branch 'many-changes' of github.com:teambit/docs into many-changes
giteden Aug 4, 2021
d6fc757
Merge branch 'many-changes' of https://github.com/teambit/docs into m…
debs-obrien Aug 5, 2021
eff8051
Update create-components.mdx
debs-obrien Aug 5, 2021
b25b9b1
add linter overview and other fixes
giteden Aug 5, 2021
577697e
build time composition
itaymendel Aug 5, 2021
a338786
fix bash comments
itaymendel Aug 5, 2021
ac9997d
update getting started
debs-obrien Aug 6, 2021
faab040
getting started improvements
debs-obrien Aug 6, 2021
ed2fd91
update dependencies
debs-obrien Aug 6, 2021
dead0b8
improvements
debs-obrien Aug 6, 2021
bc05805
improvements
debs-obrien Aug 7, 2021
65cafd1
minor improvements
debs-obrien Aug 7, 2021
480d4e2
fix styling message
debs-obrien Aug 7, 2021
1cc73b5
add note on install to other app
debs-obrien Aug 7, 2021
361b77c
intro refactored, started runtime
itaymendel Aug 7, 2021
a119006
minor fixes
debs-obrien Aug 7, 2021
00cc303
add formatting overview
giteden Aug 7, 2021
e50e7e2
Merge branch 'many-changes' of github.com:teambit/docs into many-changes
giteden Aug 7, 2021
9c2e10f
update workspace/overview
giteden Aug 7, 2021
4b756d2
restore former ws/overview
giteden Aug 8, 2021
1bdb157
benefits... done?
itaymendel Aug 8, 2021
e528216
fix title
itaymendel Aug 8, 2021
908aef3
massive updates
itaymendel Aug 8, 2021
937dfef
ci/cd copied over plus minor additions
debs-obrien Aug 9, 2021
e0dd0f5
minor improvements
debs-obrien Aug 9, 2021
654f6f4
multi-frameworks
itaymendel Aug 9, 2021
31548d3
minor improvements
debs-obrien Aug 9, 2021
4b43994
Merge branch 'many-changes' of https://github.com/teambit/docs into m…
debs-obrien Aug 9, 2021
e3e9494
data fetching
itaymendel Aug 9, 2021
31b675c
styling
itaymendel Aug 9, 2021
91d5384
fix indentation
itaymendel Aug 9, 2021
2cc732c
Angularify the docs
debs-obrien Aug 9, 2021
c3ab2cc
npmrc
itaymendel Aug 9, 2021
fce31f0
updates
itaymendel Aug 9, 2021
dd0661a
fixes and improfements
debs-obrien Aug 9, 2021
903a1e3
minor fixes
debs-obrien Aug 9, 2021
75be4fb
small changes
giteden Aug 9, 2021
c2bfe32
minor fixes
debs-obrien Aug 10, 2021
6a43835
ready to demo mfe
itaymendel Aug 10, 2021
1490157
missing pics
itaymendel Aug 10, 2021
5bc038e
add overview section to get started
debs-obrien Aug 10, 2021
3f64e91
add content
giteden Aug 10, 2021
ea1fdc0
remove overview
debs-obrien Aug 11, 2021
001efeb
Update build-pipelines.md
giteden Aug 12, 2021
ba25cb6
fixes
ranm8 Aug 12, 2021
c761db5
Merge branch 'many-changes' of github.com:teambit/docs into many-changes
ranm8 Aug 12, 2021
5d2584c
Update sidebars.js
debs-obrien Aug 12, 2021
c45406b
slight changes
ranm8 Aug 12, 2021
885bb30
Merge branch 'many-changes' of github.com:teambit/docs into many-changes
ranm8 Aug 12, 2021
e5c05f5
getting started collapsed
debs-obrien Aug 12, 2021
d3ff59a
Merge branch 'many-changes' of github.com:teambit/docs into many-changes
ranm8 Aug 12, 2021
29c2fcd
Update sidebars.js
debs-obrien Aug 12, 2021
c58b988
Merge branch 'many-changes' of github.com:teambit/docs into many-changes
ranm8 Aug 12, 2021
7533b41
add collapsed to compose components section
debs-obrien Aug 12, 2021
db684c0
globally change collapsable
debs-obrien Aug 12, 2021
ba7e7e0
set collapsable to false
debs-obrien Aug 12, 2021
b77a8ec
remove all collapsed from sidebar
debs-obrien Aug 12, 2021
bed1ec5
more collapses
debs-obrien Aug 12, 2021
c5d5205
Merge branch 'many-changes' of github.com:teambit/docs into many-changes
ranm8 Aug 12, 2021
bb3d0d6
part done
ranm8 Aug 12, 2021
8396d20
getting started and deep dive not collapsible
debs-obrien Aug 12, 2021
d392653
progress
ranm8 Aug 13, 2021
b6544d2
improvements
ranm8 Aug 15, 2021
684521d
monorepo section
ranm8 Aug 15, 2021
f0f58c2
few more changes
ranm8 Aug 15, 2021
e9c74fd
changes
ranm8 Aug 16, 2021
a1e4167
monorepo section
ranm8 Aug 16, 2021
29f27be
improvements in monorepos and structure
ranm8 Aug 16, 2021
8fd67d9
commit all
ranm8 Aug 22, 2021
d1a241c
committing all changes
ranm8 Aug 23, 2021
05b6648
fix broken links and typos. add content.
giteden Aug 24, 2021
3f65d07
some changes
giteden Aug 24, 2021
e71fa33
content
ranm8 Aug 25, 2021
a9acb2a
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
ranm8 Aug 25, 2021
8df9ecf
redo component id
giteden Aug 25, 2021
79125e1
Update component-id.md
giteden Aug 25, 2021
197f182
Update component-link.md
giteden Aug 26, 2021
1856075
improve welcome page
debs-obrien Sep 1, 2021
f057663
fix docs menu
debs-obrien Sep 1, 2021
dce965d
quick start links done
debs-obrien Sep 1, 2021
2436f24
create components and more
debs-obrien Sep 1, 2021
f47ff01
using dependencies
debs-obrien Sep 1, 2021
80bb433
dependency overview
debs-obrien Sep 1, 2021
ee17b37
create components
debs-obrien Sep 1, 2021
c2692c7
generator improvements
debs-obrien Sep 1, 2021
3537d27
Update why-bit.md
debs-obrien Sep 2, 2021
66783c3
understanding bit
debs-obrien Sep 2, 2021
0ae53bc
more link fixes and todos added
debs-obrien Sep 2, 2021
077a32f
updtate workspace
debs-obrien Sep 3, 2021
bf208e3
update components
debs-obrien Sep 3, 2021
17f0523
dependencies updated
debs-obrien Sep 3, 2021
3d84c9d
envs updated
debs-obrien Sep 3, 2021
671eea7
fixes
ranm8 Sep 3, 2021
8196d5a
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
ranm8 Sep 3, 2021
4cc8fa7
update scope
debs-obrien Sep 3, 2021
f66341e
CICD updated
debs-obrien Sep 3, 2021
cb9dabc
builder updated
debs-obrien Sep 3, 2021
b0b34b3
apps updated
debs-obrien Sep 3, 2021
8d0b293
docs updated
debs-obrien Sep 3, 2021
ac89526
geneator and compositions updated
debs-obrien Sep 3, 2021
37797f4
tester updated
debs-obrien Sep 3, 2021
fa2737d
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
ranm8 Sep 3, 2021
71f4b13
compiler updated
debs-obrien Sep 3, 2021
44e1f0f
linter updated
debs-obrien Sep 3, 2021
ece1a56
config and formatting updated
debs-obrien Sep 3, 2021
3b82653
build done
debs-obrien Sep 3, 2021
aa79b6b
extending bit and reference updated
debs-obrien Sep 3, 2021
ccda133
final updates
debs-obrien Sep 3, 2021
350db1f
remove archived and fix links
debs-obrien Sep 3, 2021
5037fc4
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
ranm8 Sep 4, 2021
693daf3
component config
ranm8 Sep 5, 2021
6945dc9
changes
ranm8 Sep 5, 2021
8313540
add component id diagram
giteden Sep 5, 2021
406cc37
id and changes
ranm8 Sep 5, 2021
1087eca
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
ranm8 Sep 5, 2021
d926d9c
add comp config snapshot
giteden Sep 5, 2021
d2ef431
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
ranm8 Sep 5, 2021
a7d5359
packages
ranm8 Sep 5, 2021
f225db4
updates
ranm8 Sep 5, 2021
d3ab2ba
with itay
ranm8 Sep 5, 2021
9b30e61
updates
ranm8 Sep 6, 2021
645a26f
changes
ranm8 Sep 6, 2021
da78370
chnages
ranm8 Sep 6, 2021
40ebdc1
small changes
giteden Sep 7, 2021
5ae2907
ci done
itaymendel Sep 8, 2021
dc82cc1
changes to react env
giteden Sep 8, 2021
365d5e0
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
giteden Sep 8, 2021
f63b073
add package-name.
giteden Sep 8, 2021
378c46b
remove ci from install doc
itaymendel Sep 9, 2021
7ecf4e0
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
itaymendel Sep 9, 2021
6e9c92a
changes
giteden Sep 9, 2021
d4915da
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
giteden Sep 9, 2021
cf1b924
add artifacts example to packing
giteden Sep 11, 2021
acffec7
add implement compiler docs
GiladShoham Sep 12, 2021
507ec56
delete old file
GiladShoham Sep 12, 2021
64c821e
add multi compiler docs
GiladShoham Sep 12, 2021
54acad0
add multi compiler example
GiladShoham Sep 12, 2021
e77963e
small changes
giteden Sep 12, 2021
430c27f
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
giteden Sep 12, 2021
10533f6
added context
ranm8 Sep 13, 2021
56acd5c
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
ranm8 Sep 13, 2021
6ebc40e
update generator and add video
debs-obrien Sep 13, 2021
c610164
add changes to implement a compiler
giteden Sep 13, 2021
02d516c
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
giteden Sep 13, 2021
4457adc
implement tester
GiladShoham Sep 13, 2021
441da42
start implelemt linter
GiladShoham Sep 14, 2021
eb9ddc5
general env is done
itaymendel Sep 15, 2021
a1d1abb
clean up 'implement a compiler'
giteden Sep 17, 2021
1b3b6af
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
giteden Sep 17, 2021
990c593
edit dev services
giteden Sep 19, 2021
e1b6c3c
implement formatter
GiladShoham Sep 19, 2021
5fdc07b
changes
giteden Sep 19, 2021
ad618a4
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
giteden Sep 19, 2021
6e3f087
add dev services overview
giteden Sep 22, 2021
a1cb552
add docs overview
giteden Sep 24, 2021
6a0223d
fixes
GiladShoham Sep 26, 2021
c4817c9
small changes
ranm8 Sep 26, 2021
2482b3d
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
ranm8 Sep 26, 2021
9d08972
add 'docs'
giteden Sep 28, 2021
098960c
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
giteden Sep 28, 2021
7618529
add docs
giteden Sep 29, 2021
dc07b81
compilation standards and small fixes
ranm8 Sep 29, 2021
1813c62
envs updates
GiladShoham Sep 30, 2021
ed92483
changes
giteden Sep 30, 2021
9ccc411
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
giteden Sep 30, 2021
7432bbd
envs: add content
giteden Sep 30, 2021
860b065
extending env
GiladShoham Sep 30, 2021
2009030
small changes
giteden Oct 3, 2021
de1cbd6
extending env
GiladShoham Oct 3, 2021
e1de660
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
giteden Oct 3, 2021
96e8377
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
giteden Oct 3, 2021
2e84c97
add envs
giteden Oct 3, 2021
d709228
add 'register a custom preview'
giteden Oct 5, 2021
06559df
add content to preview
giteden Oct 6, 2021
fe7ba77
update preview
giteden Oct 6, 2021
f4e16ff
update preview
giteden Oct 6, 2021
c3b8bce
update preview
giteden Oct 7, 2021
7710737
Improvements to the pnpm aspect page (#256)
zkochan Oct 7, 2021
0b23004
fix preview docs. add pages for compositions.
giteden Oct 10, 2021
293c62a
Merge branch 'new-docs' of github.com:teambit/docs into new-docs
giteden Oct 10, 2021
09901be
add content to compositions
giteden Oct 11, 2021
b08d9f5
add content to compositions
giteden Oct 11, 2021
4196e6f
update compositions-stories
giteden Oct 11, 2021
ab58370
Update compositions_stories.md
giteden Oct 11, 2021
0266d6b
update compositions
giteden Oct 11, 2021
9d5f086
update builder
giteden Oct 13, 2021
572be8a
update builder
giteden Oct 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions docs/apps/___create-app.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: create-app
title: Create an App
---

...
10 changes: 10 additions & 0 deletions docs/apps/___overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
id: overview
title: Overview
---

...

## What is an app component?

..
6 changes: 6 additions & 0 deletions docs/apps/___recomposing-apps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: recomposing-apps
title: Recomposing Apps
---

..
6 changes: 6 additions & 0 deletions docs/apps/deploy-app/___aws.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: aws
title: AWS
---

...
6 changes: 6 additions & 0 deletions docs/apps/deploy-app/___netlify.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: netlify
title: Netlify
---

..
6 changes: 6 additions & 0 deletions docs/apps/deploy-app/___vercel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
id: vercel
title: Vercel
---

...
2 changes: 1 addition & 1 deletion docs/aspects/builder/builder.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: builder
title: Builder
title: Build Pipelines
slug: /aspects/builder
description: build components on isolated directories
---
Expand Down
Empty file.
9 changes: 4 additions & 5 deletions docs/aspects/dependency-resolver/dependency-resolver.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ description: Simplifies the dependency management of components in a Bit workspa

Check out the [Dependency Resolver Aspect](https://bit.dev/teambit/dependencies/dependency-resolver) on Bit.dev


The [Dependency Resolver](https://bit.dev/teambit/dependencies/dependency-resolver) configures and installs dependencies for components in a Bit workspace. It auto-generates the dependency graph for components to spare us the tedious work of manually configuring it ourselves.
It does so by integrating the dependency policies set by various Bit extensions (primarily the workspace) with the components' parsed and analyzed `import`/`require` statements.
In addition to that, the Dependency Resolver offers an efficient API to manually modify the generated graph using policies that can be applied on groups of components.
Expand Down Expand Up @@ -256,9 +255,9 @@ Set the `devFilePatterns` property to add your own list of file extensions to be

#### peer dependencies

Setting a package as a peer dependency ensures the package manager installs only a single version of that package. If that is not possible, i.e. if there is no single agreed upon version for all components in the workspace, then an error will be thrown.
Setting a package as a peer dependency ensures the package manager installs only a single version of that package. If that is not possible, i.e. if there is no single "agreed upon" version for all components in the workspace, then an error will be thrown.

This can be crucial when different components communicate with each other using shared objects that are instantiated by an installed package (the dependency). If different versions of the same package create different object instances then the means of communication is broken. There is no single object to address, no single source of truth. This can turn out to be critical when working with modules that are used as plugins of another module (for example, Babel), or when working with components that are coordinated in runtime using a shared library (for example, React).
This can be crucial when different components communicate with each other using shared objects that are instantiated by an installed package (the dependency). If different versions of the same package create different object instances then the "means of communication" is broken. There is no single object to address, no single source of truth. This can turn out to be critical when working with modules that are used as "plugins" of another module (for example, Babel), or when working with components that are coordinated in runtime using a shared library (for example, React).

To set a package as a peer dependency, place it under the `peerDependencies` entry, like so:

Expand Down Expand Up @@ -349,8 +348,8 @@ Read about setting a proxy in NPM's global configuration [here](https://docs.npm
> If that token cannot be found in the `.npmrc` file, Bit will look for it in your global Bit configurations (use the `bit config` command to output your `user.token` property).
>
> <br />
> If your npm is configured to use a registry other than npmjs's, then the Dependency Resolver will use that configured registry,
> instead.
> If your npm is configured to use a registry other than npmjs's, then the Dependency
> Resolver will use that configured registry, instead.

> The 'install' process includes importing components and linking them to the `node_modules` directory.

Expand Down
1 change: 1 addition & 0 deletions docs/aspects/mdx/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default as Mdx } from './mdx.mdx';

6 changes: 3 additions & 3 deletions docs/aspects/pnpm/pnpm.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: pnpm
title: pnpm
slug: /aspects/pnmp
slug: /aspects/pnpm
description: Enables the use of pnpm in a Bit workspace
---

Expand All @@ -24,8 +24,8 @@ To start using the pnpm aspect as a package manager for your workspace, set the
}
```

> Package manager are only configurable at th workspace configuration root-level.
> That means, different components in the same workspace cannot use different package manager.
> The package manager is only configurable at the workspace configuration root-level.
> That means, different components in the same workspace cannot use different package managers.

---

Expand Down
90 changes: 90 additions & 0 deletions docs/builder/build-artifacts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
id: build-artifacts
title: Build Artifacts
---

Artifacts are files that are generated by a build task, and persisted in the component objects (the component version).

For example, TypeScript's build task generates compiled files, type decelerations and source maps. These artifacts are persisted in the component object when running the snap or tag pipelines.

```bash title="Listing the TypeScript Aspect artifacts for component ui/text"
$ bit artifacts ui/text --aspect teambit.compilation/compiler

my-workspace/ui/text@0.0.1
teambit.compilation/compiler
TSCompiler
dist/index.d.ts
dist/index.js
dist/index.js.map
dist/text.composition.d.ts
dist/text.composition.js
dist/text.composition.js.map
dist/text.d.ts
dist/text.docs.mdx
dist/text.js
dist/text.js.map
dist/text.module.scss
dist/text.spec.d.ts
dist/text.spec.js
dist/text.spec.js.map
```

## Using artifacts - CLI

Use the `--out-dir` option to extract artifacts from the component objects.

```
bit artifacts <component-id> --out-dir <dir-name>
```

[See here](/reference/cli-reference#artifacts) to learn more about the `artifacts` command.

## Using artifacts - API

Builder provides an API for retrieving artifacts from the component objects.

The following methods receive as arguments, a [Component](https://bit.dev/teambit/component/component/~code/component.ts) (a component object, not the component id) and values to filter the artifacts by. They return the artifacts as an array of [`Artifact`](https://bit.dev/teambit/pipelines/builder/~code/artifact/artifact.ts) or as an array of [`ArtifactVinyl`](https://www.npmjs.com/package/vinyl).

Use the scope API to get a component from the scope, using its component id.

### getArtifacts

```ts
getArtifacts(component: Component): ArtifactObject[] | undefined
```

### getArtifactsVinylByExtension

```ts
getArtifactsVinylByExtension(component: Component, aspectName: string): Promise<ArtifactVinyl[]>
```

### getArtifactsVinylByExtensionAndName

```ts
getArtifactsVinylByExtensionAndName(component: Component, aspectName: string, name: string): Promise<ArtifactVinyl[]>
```

### getArtifactsByName

```ts
getArtifactsByName(component: Component, name: string): ArtifactObject[] | undefined
```

### getArtifactsByExtension

```ts
getArtifactsByExtension(component: Component, aspectName: string): ArtifactObject[] | undefined
```

### getArtifactsByExtensionAndName

```ts
getArtifactsByExtensionAndName(component: Component, aspectName: string, name: string): ArtifactObject[] | undefined
```

### getDataByAspect

```ts
getDataByAspect(component: Component, aspectName: string): Serializable | undefined
```
175 changes: 175 additions & 0 deletions docs/builder/build-pipelines.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
---
id: build-pipelines
title: Build Pipelines
---

import { Image } from '@site/src/components/image';
import pipelinesImg from './pipelines.png';

The Builder runs three separate build pipelines, the basic build pipeline, the snap pipeline and the tag pipeline.

<Image src={pipelinesImg} />

To get a list of the build tasks included in each pipeline for a specific component, run `bit build --list-tasks <id>`.
For example:

```bash
bit build --list-tasks ui/button
```

```bash
Tasks List
id: my-scope/ui/button@1.0.0
envId: my-scope/custom-env@0.0.1

Build Pipeline Tasks:
teambit.harmony/aspect:CoreExporter
teambit.compilation/compiler:TSCompiler
teambit.defender/tester:TestComponents
teambit.pkg/pkg:PreparePackages
teambit.pkg/pkg:PublishDryRun
teambit.preview/preview:GeneratePreview

Tag Pipeline Tasks:
teambit.harmony/application:build_ui_application
teambit.pkg/pkg:PackComponents
teambit.pkg/pkg:PublishComponents

Snap Pipeline Tasks:
teambit.pkg/pkg:PackComponents
```

## Build (the basic build pipeline)

Components can be built without committing changes using the `bit build` command. This is often used to test the build process.
`bit build` runs only the build's build pipeline which mainly includes:

- Generating the component's `package.json`
- Installing or symlinking the component's dependencies
- Compiling the component's code (optional)
- Testing the component (optional)
- Performing ['dry run'](https://docs.npmjs.com/cli/v6/commands/npm-publish#:~:text=%5B--dry-run%5D%20As,the%20specified%20registry.)
- Generating the component's visualization (mainly, docs and 'compositions')

### Add a build task from an Env

Use the `getBuildPipe` method to customize the Env's build pipeline.

```ts
getBuildPipe?: (tsconfig?: TsConfigSourceFile) => BuildTask[];
```

For example:

```ts {2,13-24} title="my-react.main.runtime.ts"
// ...
import { PrintCmpNameTask } from './print-cmp-name.task';

export class MyReactMain {
static slots = [];

static dependencies = [ReactAspect, EnvsAspect];

static runtime = MainRuntime;

static async provider([react, envs]: [ReactMain, EnvsMain]) {
// Get the env's default build pipeline
const reactPipe = react.env.getBuildPipe();

// Add the custom task to the end of the build tasks sequence.
// Provide the task with the component ID of the Aspect (Env) using it, and a task name (i chose not to set these values in the task itself)
const tasks = [
...reactPipe,
new PrintCmpNameTask('company.scope/envs/my-react', 'PrintCmpNameTask'),
];

const templatesReactEnv = envs.compose(react.reactEnv, [
react.overrideBuildPipe(tasks),
]);
envs.registerEnv(templatesReactEnv);
return new MyReactMain();
}
}

// ..
```

See the custom task used in the example above, [here](/build-tasks).

### Add a build task from any Aspect

Use the `registerBuildTasks` API to register one or more tasks, from any Aspect.

```ts
registerBuildTasks(tasks: BuildTask[])
```

For example:

```ts title="my-aspect.main.runtime.ts"
import { BuilderMain } from '@teambit/builder';
import { PrintCmpNameTask } from './print-cmp-name.task';

export class MyAspectMain {
static slots = [];
static dependencies = [];
static runtime = MainRuntime;
static async provider() {
// Register this task using the Builder registration API.
builder.registerBuildTasks([
new ExampleTask('extensions/my-aspect', 'PrintCmpNameTask'),
]);

return new MyAspectMain();
}
}
// ..
```

## Snap

`bit snap` executes the basic pipeline before it runs its own build pipeline. The snap build pipeline consists, mainly, of packing <!--TODO [packing](#) --> the component without publishing it (since it is a snap and not a release version).

### Add a build task from an Env

Use the `getSnapPipe` method to customize the Env's build pipeline.

```ts
getSnapPipe?: (tsconfig?: TsConfigSourceFile) => BuildTask[];
```

See the [build pipeline example](#add-a-build-task-from-an-env), from more context.

### Add a build task from any Aspect

Use the `registerSnapTasks` API to register one or more tasks, from any Aspect.

```ts
registerSnapTasks(tasks: BuildTask[])
```

See the [build pipeline example](#add-a-build-task-from-any-aspect), from more context.

## Tag

`bit tag` executes the basic pipeline before it runs its own build pipeline. The snap build pipeline consists, mainly, of packing <!--TODO [packing](#) -->the component and publishing it.

### Add a build task from an Env

Use the `getTagPipe` method to customize the Env's build pipeline.

```ts
getTagPipe?: (tsconfig?: TsConfigSourceFile) => BuildTask[];
```

See the [build pipeline example](#add-a-build-task-from-an-env), from more context.

### Add a build task from any Aspect

Use the `registerTagTasks` API to register one or more tasks, from any Aspect.

```ts
registerTagTasks(tasks: BuildTask[])
```

See the [build pipeline example](#add-a-build-task-from-any-aspect), from more context.
Loading