JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q58058F
  • License MIT

A CLI tool for managing BGC X Delivery Inner Source

Package Exports

  • xdbr
  • xdbr/bin/cli.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (xdbr) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

$ xdbr

GitHub JavaScript Node.js Version Release

A CLI tool for managing BCG X Delivery Brazil Inner Source. This tool simplifies tasks such as setting up a GitHub Personal Access Token, configuring .npmrc for internal packages, installing packages, etc.

Table of Contents

Quickstart

You can use xdbr directly with npx (no global install required):

npx xdbr [command]

[!NOTE] Node.js 20.15.0 or above is required as specified in the package.json.

Installing globally

Global installation is not necessary, but if you prefer, you can install the tool globally:

npm install -g xdbr

Then you can run:

xdbr [command]

Usage

General usage

# Using npx (no global installation)
npx xdbr [command]

# If installed globally
xdbr [command]

xdbr add ghpat

Add a GitHub Personal Access Token to your .xdbr config. This token will be used to set up .npmrc and to clone repositories from the bcgx-delivery-brazil organization.

npx xdbr add ghpat

The CLI will help you to create a GitHub Personal Access Token.

xdbr add npmrc [destPath] [--global, -g]

Create or update a .npmrc file with the X Delivery Brazil GitHub npm registry and auth token. You can optionally pass the destination path otherwise it will try to install in the current folder. If the flag --global is passed, the application will set up .npmrc globally.

# Update or create a .npmrc in the current directory
npx xdbr add npmrc

# Update or create a .npmrc in a specific directory
npx xdbr add npmrc path/to/project

# Update or create a global .npmrc in your user directory
npx xdbr add npmrc --global

xdbr add mui-theme [destPath]

Installs the @bcgx-delivery-brazil/mui-theme package using your project’s package manager. If destPath is provided, the command will use that path to install and configure the theme; otherwise, it will try to install in the current path.

# Install the mui-theme in the current directory
npx xdbr add mui-theme

# Install the mui-theme in a specific directory
npx xdbr add mui-theme path/to/project

xdbr copy mui-theme [destPath]

Copies the entire theme source into your project, rather than installing the @bcgx-delivery-brazil/mui-theme package. This is particularly useful when:

  • You need to hand over the project to the client for maintenance.
  • You are collaborating with external teams that cannot install private packages.
# Copy the mui-theme to the current directory
npx xdbr copy mui-theme

# Copy the mui-theme to a specified destination
npx xdbr copy mui-theme path/to/project

[!TIP] If installing via add mui-theme is an option, that is often simpler and keeps your theme updates centralized. Only use copy mui-theme if you absolutely need to maintain the theme code directly.

xdbr help [command]

Displays help information for a specific command.

# Display general help
npx xdbr help add

# Display help for command
npx xdbr help add npmrc

Contributing

If you would like to contribute to this project, please fork the repository and submit a pull request. We welcome all contributions!

Semantic release

This project uses semantic-release for its versioning and release. In order to generate the appropriate changelog and release, you should follow the Angular Commit Message Conventions.

Running Tests

The project uses Vitest for testing. After cloning the repository and installing dependencies, you can run:

npm test

To see coverage data:

npm run coverage

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Authors