extdeps

Extract dependencies and devDependencies from package.json in markdown format.

Usage no npm install needed!

<script type="module">
  import extdeps from 'https://cdn.skypack.dev/extdeps';
</script>

README

extdeps

Extract dependencies and devDependencies from package.json in markdown format.

npm version npm downloads per month

Usage

First way

Run npx extdeps from a folder that has a package.json file and a README.md file. That's it!

Obs.: the script identifies the start of the dev dependencies section in your README by searching for a line that starts with a '#' and has 'dev' and ('dependencies' or 'libraries') on it. Also, same logic for dependencies section.

Example1 of a valid README:

## Dev dependencies

- [@babel/preset-env](https://www.npmjs.com/package/@babel/preset-env) `^7.10.4`

## Dependencies

- [cross-env](https://www.npmjs.com/package/cross-env) `^7.0.2`

Example2 of a valid README:

## Dev libraries

- [@babel/preset-env](https://www.npmjs.com/package/@babel/preset-env) `^7.10.4`

## Libraries

- [cross-env](https://www.npmjs.com/package/cross-env) `^7.0.2`

If these sections do not exist, they will be created!

Second way

Pipe package.json or redirect it to the script

cat package.json | npx extdeps

or

npx extdeps < package.json

You should see:

extdeps execution example