Run
bvm upgrade
to get the latest stable version of Bit. See Install experimental releases to try out the latest experimental features.
Bit commands support selecting a group of components using a glob pattern or multiple glob patterns separated by a comma.
For example: bit tag "ecma.blog/**"
will tag all components in the workspace that belong to the ecma.blog
scope.
We've now introduced support for component selection using component states and attributes.
Components can be selected by the following states: new
, modified
, deprecated
, deleted
, snappedOnMain
, softTagged
, and codeModified
.
A component can also be selected by its env: $env:bitdev.react/react
.
You can also use the AND
operator to combine a state and a pattern. For example, to select all deleted components that belong to the ecma.blog
scope, you can use the following pattern: "$deleted AND ecma.blog/**"
.
Use the bit pattern
command to check which components are selected by a given pattern.
For example, the following will select all new
components (i.e, components that were never versioned):
The output lists the components that would have been selected by the pattern if it was used by another Bit commands (e.g, bit tag
). This allows you to test the pattern before using it in other commands.
The bit build
command allows you to locally test your components' build pipeline.
However, this command only tests the build pipeline, and not the tag and snap pipelines.
To include the tag and snap pipelines in your local build, you can use the --include-tag
and --include-snap
flags.
For example:
The output should be similar to the following:
The build artifacts can be found in the corresponding capsule (and no new version was created).
The --include-tag
and --include-snap
flags should be used with caution as these pipelines may include package publishing or deployment tasks.
The bit scope fork
command allows you to fork an entire scope. Now, you can also fork a selection of components from a scope, using a glob pattern.
For example, the following command will fork every component with the constants
namespace from the teambit.community
.
It will set the newly forked components with a new scope my-org.my-scope
:
When using Bit's out-of-the-box component generators, any missing dependencies will be automatically installed.
When creating your own custom component generators, you can can turn on auto-install by setting the generator's installMissingDependenciesß
option to true
.
/**
* @filename: my-generator/component-template.ts
*/
import {
ComponentContext,
ComponentFile,
ComponentTemplate,
} from '@teambit/generator';
export class MyTemplate implements ComponentTemplate {
constructor(
readonly name = 'my-template',
readonly description = 'create a component using my-template',
/* set the auto-installation of missing dependencies to true */
readonly installMissingDependencies = true
/* you can also manually set the packages to be installed (not recommended for most cases) */
readonly packages = [
'package-to-be-installed-1@1.0.0',
'package-to-be-installed-2@1.0.0',
]
/**
* if the generator creates an env or an app, set the isEnv or isApp flags to true
* this will automatically install the missing dependencies for the env or app
*/
readonly isEnv = false,
readonly isApp = false,
) {}
// ...
}
Bit has been upgraded to Node v20.
#8211 #8215 #8199 #8201Discover how to kickstart your journey by seamlessly integrating Bit into your Next.js projects. Learn how to create a custom workspace, explore the latest Next.js features, and unleash the full potential of component-driven development. Whether you're a newbie or a pro, this step-by-step guide will have you crafting powerful applications in no time.
Listen to Bit's OSS leader, Gilad Shoham, discuss the challenges of component management and how Bit is paving the way for composable software and component-driven development.
Listen to the Podcast in your favorite platform: