Skip to content

natecavanaugh/list-npm-contents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

list-npm-contents

NPM version build status Test coverage

List the file contents of an npm package

This will list the files that are actually in the tarball of the NPM module, not just what's reported in the files field of package.json.

Install

$ npm install --save list-npm-contents

Usage

var listNpmContents = require('list-npm-contents');

listNpmContents('lpad').then(
	files => console.log(files)
);
//=> [ 'package.json', 'index.js', 'license', 'readme.md' ]

listNpmContents('lpad', '0.1.0').then(
	files => console.log(files)
);
//=> [ 'package.json', 'lpad.js', 'readme.md' ]

CLI

$ npm install --global list-npm-contents
$ list-npm-contents --help

  Usage
$ list-npm-contents package-name

	Options
	-V, --module-version The version of the module you wish to view. Default: latest

	Examples:
	$ list-npm-contents lpad
	package.json
	index.js
	license
	readme.md

	$ list-npm-contents lpad -V 0.1.0
	package.json
	lpad.js
	readme.md

API

listNpmContents(packageName, [version])

packageName

Required Type: string

The name of the package on NPM to look up the files for.

version

Type: string Default: latest

The version of the module to look for.

License

MIT © Nate Cavanaugh

About

Lists the contents of an NPM module

Resources

License

Stars

Watchers

Forks

Packages

No packages published