DEV Community

Cover image for Automates the consolidation of npm dependencies from different projects into a single new project.
joseluis18vs
joseluis18vs

Posted on

Automates the consolidation of npm dependencies from different projects into a single new project.

bundpac

Is a npm tool that quickly and easily automates the consolidation of dependencies from different projects into a single new project.

Overview

  1. List All Projects: Easily view all projects (npm) within a specified directory.

  2. Dynamic Project Selection: Facilitates the dynamic selection of different projects from the listed ones.

  3. Dependency Consolidation: Automatically creates a new directory with a provided name and generates a package.json file inside. This package.json file consolidates all the dependencies from the selected projects.

Installation

Install bundpac globally using npm:


npm install -g bundpac

Usage

  1. Install "bundpac" globally.


    npm install -g bundpac

  2. Open a console (CMD).

  3. Go to the directory where the subdirectories of the projects you want to consolidate are located. (The script checks all subdirectories for the "package.json" file of each project and extracts the name of the project and its dependencies).

  4. Type the command bundpac and press "Enter", the menu will pop up.

  5. Select two or more projects you wish to consolidate. (To change the selection status of the projects, hover over the project in the list and press the space key to change the selection status.)

  6. Once the desired projects have been selected, press the "Enter" key.

  7. A text box will be displayed where you will enter the name of the consolidated project.

  8. Once the name is entered, press the "Enter" key to create the project and the project directory with its package.json will be automatically created.

  9. In a console (CMD) enter the directory of the created project and execute

    npm install

    to install all the dependencies.

  10. To exit you can press 'esc' or the combination of "ctrl + z" or "shift + q".

Example

Menu

Menu

Select Projects

Select

New project name

Select

New project created

Select

Contributing

Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.

Github Repo

License

This project is licensed under the MIT License.

Top comments (0)