npm-source-fetcher
v1.0.3
Published
`npm-source-fetcher` is a CLI tool that fetches the source code of any npm package by retrieving its repository and cloning it.
Readme
npm-source-fetcher
npm-source-fetcher is a CLI tool that fetches the source code of any npm package by retrieving its repository and cloning it.
Installation
You can install the package globally using npm:
npm install -g npm-source-fetcherOr use it directly with npx:
npx npm-source-fetcher <package-name>Usage
To fetch the source code of an npm package, run:
npm-source-fetcher <package-name>For example:
npm-source-fetcher reactThis will clone the source code of the react package into a source-code/react directory.
How It Works
- Fetches metadata of the npm package from the npm registry.
- Extracts the repository URL from the package metadata.
- Clones the repository into the
source-codedirectory.
Dependencies
axios- For fetching package metadata from the npm registry.simple-git- For cloning the repository.
License
MIT License
