Scopes are distributed by nature. Setting up a free (forever for open source) remote Scope on bitsrc.io is quick and provides many advantages - but you can also choose to set up a remote Scope on your local machine.
Scopes are one of Bit’s most important entities: they are your component collections.
Scopes functions as your source of truth, even when your components are sourced in synced in multiple repositories.
Scopes also act as a virtualized layer that allows you to manage your components across different projects and applications.
Creating a Scope on bitsrc.io is not only easier, it provides additional features for discoverability and experience such as a smart component search engine, component rendering, docs and examples parsed from the source code and an isolated component environment - so you can monitor and understand components without having to spend hours writing docs.
Create a Scope on BitSrc
Once signed-in, you can always click on the ‘create new Scope’ icon in the top-right corner of the screen.
You will now be prompted with the ‘new Scope creation’ window.
- Scope name - The name of the Scope
- Description - A short sentence describing the Scope and the components it contains (see example).
- Visibility - Determines who can view the Scope.
- Public - Free Scope to be searched and viewed by the whole BitSrc community. BitSrc offers free hosting for public open source Scopes, now and forever.
- Private - Closed Scope. Only members can search it, and view its contents.
- License - Code license for all the contents of the Scope.
Once all of the details are filled in, click ‘create Scope’.
You will then be redirected to your newly created Scope.
Update Scope settings
How to update Scope settings
- Click on “settings” inside your Scope.
- Change your description.
- Click on “Update Scope”.
You can change the scope visibility from private to public, via the Scope settings page.
Changing a Scope visibility will affect all the components within that Scope, so be careful when doing so, as this will affect other developers using the components.
If a component is changed from public to private, all other Scopes that had it in their cache, will still keep it in the last public version of it. However, all other projects that installed a component via NPM/Yarn, and do not have specific permission set to view the private component, will no longer have access to them.
Currently there are 5 licenses options you can choose from:
- GPL- 3.0
- BSD (1,2,3)
If you chose one license and you want to change it, click on “Settings” inside the specific Scope and change the license.
Important: The license will be applied to all the components within the Scope.
There are 3 type of permissions that can be granted for your BitSrc Scopes:
- Owner - an owner has full root access to the Scope. They have all permissions, including the ability to set permissions and manage Scope membership.
- Collaborator - a collaborator can contribute to a Scope. They can’t invite new collaborators.
- Viewer - a viewer can only view the Scope and its contents, without changing anything in it.
A Scope owner can add an unlimited amount of signed-up users to have ‘collaborator’ permissions on any Scope the owner owns.
To add a collaborator:
- Go to your “Scope” page.
- Type either the username or email address of the collaborator you wish to add inside the “add collaborator” text Scope.
- Click on “Add”.
To remove a collaborator:
- Go to your “Scope” page.
- Find the user you would like to remove in the Collaborators list.
- Hover over the username and a “Remove” button will appear next to it.
- Click on “Remove” to remove the relevant collaborator.
Note: removing people might hurt their feelings :)
The Scope Page
The Scope page (example) is a useful UI for working with Scopes hosted on BitSrc.
They present valuable information about the Scope such as:
- Scope Name
The Scope page also offers an overview of the different components found in this Scope, and enables you to filter them by namespaces and more.
Note that the pane to the left of the components offers quick browsing of the components based on their namespaces. This helps users find components by context and functionality.