Packing Components

Component packages are generated during execution of the Component build pipeline and persisted as artifacts upon component versioning. Snapping a component will result in a newly generated package for the component. To simulate packages prior to tag or snap, use bit build and inspect capsules.

$ bit tag ui/heading

...
✔ env "company.scope/envs/my-react@0.0.1", task "teambit.pkg/pkg:PackComponents" has completed successfully in 1s
CopiedCopy

The generated artifact can be viewed with the bit artifacts command.

$ bit artifacts ui/heading --task PackComponents

my-workspace/ui/heading@0.0.1
  teambit.pkg/pkg
    PackComponents
      package-tar/company-scope.ui.heading-0.0.1.tgz
CopiedCopy

Generate packages

Component packages can be manually generated, for any purpose, using bit pack

bit pack ui/heading
CopiedCopy

Excluding sources from packages

To exclude sources from being included in the package, set the files property either from the development env or with component configuration.

{
  "teambit.pkg/pkg": {
    "packageJsonProps": {
      "files": ["dist"]
    }
  }
}
CopiedCopy