PageSourceSearch

https://bit.dev/176.17e1ef5517120662ba3e.js

js bit.dev collected 2026-10-02 04:11:20 UTC 4,399 bytes, 14 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[176],{728981(b,i,p){p.r(i),p.d(i,{UsingAspects:()=>r.A,default:()=>r.A});var r=p(162576),m={id:"teambit.harmony/content/[email protected]",homepage:"https://bit.cloud/teambit/harmony/content/using-aspects",exported:!0}},162576(b,i,p){var r,m={id:"teambit.harmony/content/[email protected]",homepage:"https://bit.cloud/teambit/harmony/content/using-aspects",exported:!0};r={value:!0},i.A=d;var _=l(p(531715)),e=p(437910),y=p(168851),g=["components"];function l(t){return t&&t.__esModule?t:{default:t}}l.__bit_component=m;function u(){return u=Object.assign?Object.assign.bind():function(t){for(var s=1;s<arguments.length;s++){var a=arguments[s];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t},u.apply(this,arguments)}u.__bit_component=m;function h(t,s){if(t==null)return{};var a=x(t,s),n,o;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(o=0;o<c.length;o++)n=c[o],!(s.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,n)||(a[n]=t[n]))}return a}h.__bit_component=m;function x(t,s){if(t==null)return{};var a={},n=Object.keys(t),o,c;for(c=0;c<n.length;c++)o=n[c],!(s.indexOf(o)>=0)&&(a[o]=t[o]);return a}x.__bit_component=m;var f={},v="wrapper";function d(t){var s=t.components,a=h(t,g);return(0,e.mdx)(v,u({},f,a,{components:s,mdxType:"MDXLayout"}),(0,e.mdx)("h1",null,"Using Aspects"),(0,e.mdx)("p",null,`Aspects can be used to extend Bit by configuring them on your Workspace, Scope and Components. You can also use Aspects from other Aspects you
2build and use them as an API.`),(0,e.mdx)("p",null,"You can use official and community Aspects built by us and the Bit community like the ones below or ",(0,e.mdx)("a",{parentName:"p",href:"/extending-bit/create-aspect"},"build your own Aspect"),"."),(0,e.mdx)(y.ComponentCardDisplay,{componentIds:["teambit.typescript/typescript","teambit.angular/angular","teambit.mdx/mdx"],mdxType:"C
2omponentCardDisplay"}),(0,e.mdx)("br",null),(0,e.mdx)("p",null,"You can find more ",(0,e.mdx)("a",{parentName:"p",href:"/extending-bit/aspect-overview#discoverable"},"available aspects to use here")," and on the ",(0,e.mdx)("a",{parentName:"p",href:"https://bit.cloud/components?env=aspect"},"bit.cloud")," search!"),(0,e.mdx)("h2",null,"Using Aspects"),(0,e.mdx)("p",null,`Aspects can be configured across any Bit config. That means, you can use aspects to extend the functionality of Scopes, Workspaces,
3Components or any other feature built in an Aspect.`),(0,e.mdx)("pre",null,(0,e.mdx)("code",{parentName:"pre",className:"language-json"},`{
4  "myorg.dev/my-aspect": {}
5}
6`)),(0,e.mdx)("h2",null,"Listing aspects"),(0,e.mdx)("p",null,"List all components and the aspects they have configured."),(0,e.mdx)("pre",null,(0,e.mdx)("code",{parentName:"pre"},`bit aspect list
7`)),(0,e.mdx)("h2",null,"Inspecting aspects"),(0,e.mdx)("p",null,"Inspect a specific component` aspects, including metadata and config."),(0,e.mdx)("pre",null,(0,e.mdx)("code",{parentName:"pre"},`bit aspect get docs/apps-overview
8`)),(0,e.mdx)("h2",null,"Updating aspects"),(0,e.mdx)("p",null,"Update components to a newer aspect version."),(0,e.mdx)("p",null,"Update all components using the community-react aspect."),(0,e.mdx)("pre",null,(0,e.mdx)("code",{parentName:"pre",className:"language-bash"},`bit aspect update teambit.community/envs/community-react
9`)),(0,e.mdx)("p",null,"Update components using the community-env aspect under the ui/","*"," namespace."),(0,e.mdx)("pre",null,(0,e.mdx)("code",{parentName:"pre",className:"language-bash"},`bit aspect update teambit.community/envs/community-react "ui/*"
10`)),(0,e.mdx)("h2",null,"As an Aspect dependency"),(0,e.mdx)("p",null,"Aspects can be used as dependencies by other aspects. See ",(0,e.mdx)("a",{parentName:"p",href:"/extending-bit/create-aspect#using-dependencies"},"Using dependencies"),"."),(0,e.mdx)("h2",null,"Composing aspects into applications"),(0,e.mdx)("p",null,"Behind the scenes, Aspects apps are executed with Harmony, Bit's micro-kernel which powers its extensibility."),(0,e.mdx)("p",null,"Running Aspects with harmony:"),(0,e.mdx)("pre",null,(0,e.mdx)("code",{parentName:"pre",className:"language-tsx"},`import { Harmony } from '@teambit/harmony';
11import { MyAspect } from '@myorg/dev.my-aspect';
12
13Harmony.run([MyAspect]);
14`)))}d.__bit_component=m,d.isMDXComponent=!0}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.