Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/capjavert/package-transfer

Simple utility to transfer packages from your dependencies or devDependencies lists into new project.
https://github.com/capjavert/package-transfer

cli hacktoberfest npm package-json package-manager package-manager-tool

Last synced: about 2 months ago
JSON representation

Simple utility to transfer packages from your dependencies or devDependencies lists into new project.

Awesome Lists containing this project

README

        

# package-transfer

[![npm](https://img.shields.io/npm/v/package-transfer)](https://www.npmjs.com/package/package-transfer)
[![Build Status](https://travis-ci.org/capJavert/package-transfer.svg?branch=master)](https://travis-ci.org/capJavert/package-transfer)
[![Coverage Status](https://coveralls.io/repos/github/capJavert/package-transfer/badge.svg)](https://coveralls.io/github/capJavert/package-transfer)

Simple utility to transfer packages from your dependencies or devDependencies lists into new project.

## Install
```
npm install -g package-transfer
```

## Usage
```
pkg-transfer [options]
```

Transfer dependencies from `old-project` to current project (`my-new-project`):
```
cd my-new-project
pkg-transfer -s ../old-project
```

The command detects which packages need to be transferred and offers to auto install them into target package.

This command does exactly the same thing only for devDependencies:
```
pkg-transfer -s ../old-project --dev
```

If you prefer `yarn` over `npm`:
```
pkg-transfer -s ../old-project --yarn
```

## Strict mode

Most of the time you are locking your package.json dependencies to exact version. If you wish to transfer those exact versions to target package.json then just use `--strict` argument.

```
pkg-transfer -s ../my-project --strict
```

## Help
Usage: pkg-transfer [options]

Options:

-v, --version **Print version**

--verbose **Increase logging verbosity**

-h, --help **Output help and usage information**

-s, --source **Source package (from where you want to transfer dependencies)**

-t, --target **Target package (defaults to current directory)**

--yarn **Use yarn instead of npm**

--dev **Transfer devDependencies**

--dry-run **Just prints install command, does NOT really install anything**

--strict **Use exact versions from source package.json when installing dependencies**