A command-line tool to view or copy an npm package's dependencies.
$ cp-dep <path-to-old-project> [options]
Install globally with npm.
$ npm i -g cp-dep
- Print dependencies to the console
- Copy dependencies to the clipboard as an npm install command
- All dependencies
- Full dependencies only
- Dev dependencies only
How to use
Use the keyword
cp-dep and provide a path to a
--path: The path of the package.json you want to copy. Path defaults to the current directory if none is provided.
--full: View/Copy only full dependencies.
--dev: View/Copy only dev dependencies.
--copy: Copy the npm install command to the clipboard.
--suppress: Do not print the packages to the console.
--help: Show the help file.
--upgrade: Use current release for packages
Copy all dependencies of a project from the current directory.$ cp-dep -c
View the dev dependencies of a project on your desktop.$ cp-dep ~/Desktop/myProject/package.json --dev
Copy only the full dependencies from a project in your Documents folder, but don't print the results.$ cp-dep ~/Documents/myOtherProject/ -cfx
Copy all dependencies from the project in your current folder and upgrade to the newest versions.$ cp-dep -cu
To run the test suite, clone the repo, install the dependencies, then run
$ git clone https://github.com/RobertMcReed/cp-dep.git$ npm i$ npm test
Future Release Features
- Install dependencies for a project at a given directory.
- Flag to selectively choose which packages to include in the copy command.
- Initial release
- Readme command typos fixed
- Install script now maintains the versioning of the copied dependencies
- Use the -u flag to upgrade all packages to the newest versions
- Fixed ^ slice issue with versioning