PageSourceSearch

https://bit.dev/108.44f869106f8908f1431d.js

js bit.dev collected 2026-10-02 04:09:38 UTC 14,254 bytes, 18 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[108],{131678(P,p,n){var c,a={id:"teambit.docs/content/getting-started/[email protected]",homepage:"https://bit.cloud/teambit/docs/content/getting-started/create-remote-scope",exported:!0};c={value:!0},p.A=r;var f=v(n(531715)),e=n(437910),b=n(368704),h=["components"];function v(o){return o&&o.__esModule?o:{default:o}}v.__bit_component=a;function i(){return i=Object.assign?Object.assign.bind():function(o){for(var s=1;s<arguments.length;s++){var t=arguments[s];for(var m in t)({}).hasOwnProperty.call(t,m)&&(o[m]=t[m])}return o},i.apply(null,arguments)}i.__bit_component=a;function x(o,s){if(o==null)return{};var t,m,l=g(o,s);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(o);for(m=0;m<y.length;m++)t=y[m],s.indexOf(t)===-1&&{}.propertyIsEnumerable.call(o,t)&&(l[t]=o[t])}return l}x.__bit_component=a;function g(o,s){if(o==null)return{};var t={};for(var m in o)if({}.hasOwnProperty.call(o,m)){if(s.indexOf(m)!==-1)continue;t[m]=o[m]}return t}g.__bit_component=a;var d={},_="wrapper";function r(o){var s=o.components,t=x(o,h);return(0,e.mdx)(_,i({},d,t,{components:s,mdxType:"MDXLayout"}),(0,e.mdx)("p",null,"Bit uses ",(0,e.mdx)("a",{parentName:"p",href:"https://bit.cloud"},"bit.cloud")," as its default hosting provider. To register or sign in from your terminal, run the following:"),(0,e.mdx)(b.LoginExample,{mdxType:"LoginExample"}),(0,e.mdx)("p",null,"Once an account has been created successfully, your terminal will greet you with the following message:"),(0,e.mdx)(b.LoginOutput,{mdxType:"LoginOutput"}),(0,e.mdx)("p",null,"Now that you have set up your account and logged in, head over to the ",(0,e.mdx)("a",{parentName:"p",href:"https://bit.cloud/~create-scope"},"create scope"),` page to create a new scope.
2Choose a name for your scope that describes the common purpose or functionality of your components.`),(0,e.mdx)("h2",null,"Set a scope as the workspace default scope"),(0,e.mdx)("p",null,"Now that you've created a remote scope on bit.cloud, verify that the ",(0,e.mdx)("inlineCode",{parentName:"p"},"defaultScope")," property in the ",(0,e.mdx)("inlineCode",{parentName:"p"},"workspace.jsonc")," config file is set to the correct username/org and scope name."),(0,e.mdx)("pre",null,(0,e.mdx)("code",{parentName:"pre",className:"language-js"},`{
3  "teambit.workspace/workspace": {
4    /* set a scope with this pattern: <username-or-org>.<scope-name> */
5    "defaultScope": "my-org.tasks-scope"
6  }
7}
8`)))}r.__bit_component=a,r.isMDXComponent=!0},368704(P,p,n){n.r(p),n.d(p,{BitScope:()=>i,InitExample:()=>d,LinkExample:()=>g,LoginExample:()=>h,LoginOutput:()=>v,SetScopeExample:()=>x});var c=n(134307),a=n(87945),f=n(967590),e=n(437612),b={id:"teambit.docs/content/getting-started/[email protected]",homepage:"https://bit.cloud/teambit/docs/content/getting-started/create-remote-scope",exported:!0};const h=()=>(0,c.jsx)(f.K,{commandName:"login",commandExample:{}});h.__bit_component=b;const v=()=>(0,c.jsx)(a.BK,{isOutput:!0,children:(0,c.jsx)("span",{className:e.A.greenHighlight,children:"success! logged in as <account-name>"})});v.__bit_component=b;const i=()=>(0,c.jsx)(f.K,{commandName:"scope",subCommandName:"set"});i.__bit_component=b;const x=()=>{const _={"scope-name":"my-org.tasks-scope","component-pattern":"apps/to-do"};return(0,c.jsx)(f.K,{commandName:"scope",subCommandName:"set",commandExample:_})};x.__bit_component=b;const g=()=>(0,c.jsx)(f.K,{commandName:"link",commandExample:{}});g.__bit_component=b;const d=()=>{const _={"reset-new":!0};return(0,c.jsx)(f.K,{commandName:"init",commandExample:_})};d.__bit_component=b},728193(P,p,n){var c,a={id:"teambit.docs/content/getting-started/[email protected]",homepage:"https://bit.cloud/teambit/docs/content/getting-started/create-remote-scope",exported:!0};c={value:!0},p.A=s;var f=x(n(531715)),e=n(437910),b=n(141716),h=n(368704),v=n(952713),i=["components"];function x(t){return t&&t.__esModule?t:{default:t}}x.__bit_component=a;function g(){return g=Object.assign?Object.assign.bind():function(t){for(var m=1;m<arguments.length;m++){var l=arguments[m];for(var y in l)({}
8).hasOwnProperty.call(l,y)&&(t[y]=l[y])}return t},g.apply(null,arguments)}g.__bit_component=a;function d(t,m){if(t==null)return{};var l,y,j=_(t,m);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(t);for(y=0;y<u.length;y++)l=u[y],m.indexOf(l)===-1&&{}.propertyIsEnumerable.call(t,l)&&(j[l]=t[l])}return j}d.__bit_component=a;function _(t,m){if(t==null)return{};var l={};for(var y in t)if({}.hasOwnProperty.call(t,y)){if(m.indexOf(y)!==-1)continue;l[y]=t[y]}return l}_.__bit_component=a;var r={},o="wrapper";function s(t){var m=t.components,l=d(t,i);return(0,e.mdx)(o,g({},r,l,{components:m,mdxType:"MDXLayout"}),(0,e.mdx)("h1",null,"Create a Remote Scope"),(0,e.mdx)("p",null,"Scope is a collaboration server for components. It is where components are ",(0,e.mdx)("a",{parentName:"p",href:"/getting-started/collaborate/exporting-components"},"exported")," to and ",(0,e.mdx)("a",{parentName:"p",href:"/getting-started/collaborate/importing-components"},"imported"),` from.
9Scopes provide a Web UI and expose a GraphQL API. They can be extended and customized using Bit aspects.`),(0,e.mdx)("p",null,"Choose between hosting a scope on ",(0,e.mdx)("a",{parentName:"p",href:"https://bit.cloud"},"bit.cloud")," (for free) and self-hosting:"),(0,e.mdx)(b.HostingScopeOptions,{mdxType:"HostingScopeOptions"}),(0,e.mdx)("p",null,`The scope name is part of the component ID. When the scope name changes, the relevant component IDs change.
10To reflect that change in the component package names, run the following:`),(0,e.mdx)(h.LinkExample,{mdxType:"LinkExample"}),(0,e.mdx)("div",{className:"admonition admonition-info alert alert--info"},(0,e.mdx)("div",{parentName:"div",className:"admonition-heading"},(0,e.mdx)("h5",{parentName:"div"},(0,e.mdx)("span",{parentName:"h5",className:"admonition-icon"},(0,e.mdx)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},(0,e.mdx)("path",{parentName:"svg",fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))),"Maintaining components of different scopes in the same workspace")),(0,e.mdx)("div",{parentName:"div",className:"admonition-content"},(0,e.mdx)("p",{parentName:"div"},"The ",(0,e.mdx)("inlineCode",{parentName:"p"},"defaultScope"),` property defines the default scope name for components in that workspace.
11However, components in the same workspace can be configured to use different scopes.`),(0,e.mdx)("p",{parentName:"div"},"You can set a scope on a component (directly) when ",(0,e.mdx)("a",{parentName:"p",href:"/getting-started/composing/creating-components"},"creating a new component"),", or after a component was created:"),(0,e.mdx)(h.SetScopeExample,{mdxType:"SetScopeExample"}),(0,e.mdx)(v.ExpandedScope,{mdxType:"ExpandedScope"}))),(0,e.mdx)("h3",null,"Reset all components"),(0,e.mdx)("p",null,"Once a component is snapped, its scope name can no longer be changed. To reset all components (which exist only locally) back to their 'new' and un-versioned state, run:"),(0,e.mdx)(h.InitExample,{mdxType:"InitExample"}),(0,e.mdx)("p",null,"Alternatively, use the ",(0,e.mdx)("inlineCode",{parentName:"p"},"scope")," command shown above, to change the scope name while still retaining the components' history."))}s.__bit_component=a,s.isMDXComponent=!0},952713(P,p,n){n.r(p),n.d(p,{ExpandedScope:()=>b});var c=n(134307),a=n(324500),f=n(368704),e={id:"teambit.docs/content/getting-started/[email protected]",homepage:"https://bit.cloud/teambit/docs/content/getting-started/create-remote-scope",exported:!0};const b=()=>(0,c.jsx)(a._,{snippet:f.BitScope});b.__bit_component=e},141716(P,p,n){n.r(p),n.d(p,{HostingScopeOptions:()=>j});var c=n(134307),a=n(531715),f=n(821133),e={id:"teambit.community/ui/[email protected]",homepage:"https://bit.dev/teambit/community/ui/content-tabs",exported:!0};const b=()=>{try{return window.top.location.host,!0}catch{return!1}};b.__bit_component=e;const h=()=>{var u;const E=window.top.location.href,S=E.split("?")[0],O=(u=E.split("?")[1])!==null&&u!==void 0?u:"";return{base:S,params:O}};h.__bit_component=e;const v=u=>{const E=u&&b(),S=E&&h().params.includes(u)?parseInt(new URLSearchParams(`?${h().params}`).get(u)):0,[O,w]=(0,a.useState)(S),T=C=>{if(w(C),!E)return;const N=new URLSearchParams(`?${h().params}`);N.set(u,C.toString()),window.top.history.pushState({},"",`${h().base}?${N.toString().replace("=&","&")}`)};return T.__bit_component=e,{activeTab:O,setActiveTab:T}};v.__bit_component=e;const i={tabs:"styles_tabs__XFt74"};
11var x={id:"teambit.community/ui/[email protected]",homepage:"https://bit.dev/teambit/community/ui/content-tabs",exported:!0},g=function(u,E){var S={};for(var O in u)Object.prototype.hasOwnProperty.call(u,O)&&E.indexOf(O)<0&&(S[O]=u[O]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function")for(var w=0,O=Object.getOwnPropertySymbols(u);w<O.length;w++)E.indexOf(O[w])<0&&Object.prototype.propertyIsEnumerable.call(u,O[w])&&(S[O[w]]=u[O[w]]);return S};const d=u=>{var{content:E,tabsUrlParam:S}=u,O=g(u,["content","tabsUrlParam"]);const{activeTab:w,setActiveTab:T}=v(S),C=E[w].Body;return a.createElement("div",Object.assign({},O),a.createElement("div",{className:i.tabs},E.map(({title:N},D)=>{const L=N;return a.createElement(f.o,{key:D,isActive:D===w,onClick:()=>T(D)},typeof N=="string"?N:a.createElement(L,null))})),a.createElement(C,null))};d.__bit_component=x;var _={id:"teambit.community/ui/[email protected]",homepage:"https://bit.dev/teambit/community/ui/content-tabs",exported:!0},r=n(437612),o=n(131678),s=n(162219),t={id:"teambit.docs/content/getting-started/[email protected]",homepage:"https://bit.cloud/teambit/docs/content/getting-started/create-remote-scope",exported:!0};const m=()=>(0,c.jsx)("span",{className:r.A.title,children:"bit.cloud"});m.__bit_component=t;const l=()=>(0,c.jsx)("span",{className:r.A.title,children:"Self-hosted"});l.__bit_component=t;const y=[{title:m,Body:o.A},{title:l,Body:s.A}],j=()=>(0,c.jsx)(d,{content:y,tabsUrlParam:"scope-hosting-option"});j.__bit_component=t},769648(P,p,n){n.r(p),n.d(p,{CreateRemoteScope:()=>c.A,default:()=>c.A});var c=n(728193),a={id:"teambit.docs/content/getting-started/[email protected]",homepage:"https://bit.cloud/teambit/docs/content/getting-started/create-remote-scope",exported:!0}},162219(P,p,n){var c,a={id:"teambit.docs/content/getting-started/[email protected]",homepage:"https://bit.cloud/teambit/docs/content/getting-started/create-remote-scope",exported:!0};c={value:!0},p.A=_;var f=h(n(531715)),e=n(437910),b=["components"];function h(r){return r&&r.__esModule?r:{default:r}}h.__bit_component=a;function v(){return v=Object.assign?Object.assign.bind():function(r){for(var o=1;o<arguments.length;o++){var s=arguments[o];for(var t in s)({}).hasOwnProperty.call(s,t)&&(r[t]=s[t])}return r},v.apply(null,arguments)}v.__bit_component=a;function i(r,o){if(r==null)return{};var s,t,m=x(r,o);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(r);for(t=0;t<l.length;t++)s=l[t],o.indexOf(s)===-1&&{}.propertyIsEnumerable.call(r,s)&&(m[s]=r[s])}return m}i.__bit_component=a;function x(r,o){if(r==null)return{};var s={};for(var t in r)if({}.hasOwnProperty.call(r,t)){if(o.indexOf(t)!==-1)continue;s[t]=r[t]}return s}x.__bit_component=a;var g={},d="wrapper";function _(r){var o=r.components,s=i(r,b);return(0,e.mdx)(d,v({},g,s,{components:o,mdxType:"MDXLayout"}),(0,e.mdx)("p",null,`Self hosting your own scope requires provisioning a dedicated container either locally, on Kubernetes, or any other cloud provider.
12To learn more, see `,(0,e.mdx)("a",{parentName:"p",href:"/scope/running-a-scope-server"},"Hosting scopes"),"."),(0,e.mdx)("h2",null,"Set a scope as the workspace default scope"),(0,e.mdx)("p",null,"Now that you have set up a remote scope, verify that the ",(0,e.mdx)("inlineCode",{parentName:"p"},"defaultScope")," property in your ",(0,e.mdx)("inlineCode",{parentName:"p"},"workspace.jsonc")," config file is set to the correct account and scope name."),(0,e.mdx)("p",null,"Note that a single workspace can maintain components of different scopes. The ",(0,e.mdx)("inlineCode",{parentName:"p"},"defaultScope"),` property defines the default configuration for components.
13It does not limit components from using other scopes.`),(0,e.mdx)("pre",null,(0,e.mdx)("code",{parentName:"pre",className:"language-js"},`{
14  "teambit.workspace/workspace": {
15    "defaultScope": "tasks-scope"
16  }
17}
18`)))}_.__bit_component=a,_.isMDXComponent=!0},821133(P,p,n){var c,a={id:"teambit.ui-foundation/ui/use-box/[email protected]",homepage:"https://bit.dev/teambit/ui-foundation/ui/use-box/tab",exported:!0}
18;c={value:!0},p.o=void 0;var f=n(261350);Object.defineProperty(p,"o",{enumerable:!0,get:function(){return f.Tab}})},261350(P,p,n){var c={id:"teambit.ui-foundation/ui/use-box/[email protected]",homepage:"https://bit.dev/teambit/ui-foundation/ui/use-box/tab",exported:!0},a=this&&this.__rest||function(i,x){var g={};for(var d in i)Object.prototype.hasOwnProperty.call(i,d)&&x.indexOf(d)<0&&(g[d]=i[d]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var _=0,d=Object.getOwnPropertySymbols(i);_<d.length;_++)x.indexOf(d[_])<0&&Object.prototype.propertyIsEnumerable.call(i,d[_])&&(g[d[_]]=i[d[_]]);return g},f=this&&this.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(p,"__esModule",{value:!0}),p.Tab=void 0;const e=f(n(531715)),b=f(n(879288)),h=f(n(75906));function v(i){var{onClick:x,isActive:g,className:d,children:_}=i,r=a(i,["onClick","isActive","className","children"]);return e.default.createElement("div",Object.assign({},r,{className:(0,b.default)(h.default.tab,g&&h.default.active,d),onClick:x}),_)}v.__bit_component=c,p.Tab=v},437612(P,p,n){n.d(p,{A:()=>c});const c={title:"styles_title__yf1w7",greenHighlight:"styles_greenHighlight__LwNuo"}},75906(P,p,n){n.r(p),n.d(p,{default:()=>c});const c={tab:"tab_tab__+UEPd",active:"tab_active__wr9JY"}}}]);

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.