Front-end development is increasingly componentized, and the biggest benefit is the sharing of UI pages and logic.

In the eyes of developers, if you open a website, componentized development will make you look like this:

Front-end development is increasingly componentized, and the biggest benefit is the sharing of UI pages and logic.

In the eyes of developers, if you open a website, componentized development will make you look like this:

Logically, we will encapsulate it into a library, and then NPM will publish it to the public warehouse for sharing. UI components seem to be copied internally from one project to another if they want to be shared.

Because each product and each company have different requirements for UI, and more importantly, they need to achieve a shared internal team. Therefore, it is particularly necessary to build a platform like NPM in the company.

A Bit is such a platform for collecting shared components

What is a Bit

Bit is an open source CLI tool for collaboration between isolated components across projects and across repositories.

Use BITS to distribute discrete components from a design library or project into separate reusable packages that can be used across projects.

You can use your own separate server for component collaboration, or you can use bit.dev cloud hosting for private and public component sharing.

Why select Bit

Bit simplifies the process of collaboration on UI components. Team members can share, maintain, and synchronize isolated components from different projects.

Bit allows your team to:

  • Improve code reusability
  • Improve design and development efficiency
  • Keep the UI and UX consistent
  • Increase project stability

Main features

  • Extract components to be shared directly from an existing library or project
  • Verify component independence by building and testing each component separately from the rest of the project.
  • Change the source code from any application that uses shared components
  • Gets published changes in a component based on local changes
  • Feedback changes made to components directly from the using application
  • Each component is automatically packaged as an NPM package
  • Distribute discrete components rather than a single large package
  • Automatic component versioning based on changes in component dependencies
  • Use with leading frameworks and tools: React, Vue, Angular, Mocha, Jest.
  • Use with Git, NPM, and Yarn

Bit works well with JavaScript and JavaScript frameworks

The installation

The use of NPM

npm install bit-bin --global
Copy the code

Or use YARN

yarn global add bit-bin  
Copy the code

Bit Cli Node 8.12 or later is required

Use bit.dev for hosting

Upload your components to a shared component hosted server for sharing

See docs.bit.dev/docs/quick-…

Welcome to pay attention to the public “space programming”, take you to understand the core programming knowledge