Get unlimited public & private packages + team-based management with npm Teams.Learn more »

npm-publish-files

1.0.21 • Public • Published

npm-publish-files

GitHub Actions version code size dependencies devDependencies

Copy special files npm publish always includes to a sub directory.

If you want to build a large npm project into a sub folder dist/, but then treat that as the root directory for the published package, you will need to copy all other special files npm includes in the publish. Let npm-publish-files do that for you!

Install

npm install --save-dev npm-publish-files

Setup

This script will make sure all necessary files are copied to dist/ before running npm publish:

{
  "scripts": {
    "prepublishOnly": "npm-publish-files --force dist"
  }
}

After this your are free to run npm publish dist.

Options

npm-publish-files supports a few options:

  • --force — Copy files and overwrite existing ones [default: false]
  • --clean — Remove files instead of copying them [default: false]

Files Copied

npm-publish-files chooses the files to copy according to the npm docs.

Install

npm i npm-publish-files

DownloadsWeekly Downloads

12

Version

1.0.21

License

MIT

Unpacked Size

15 kB

Total Files

5

Last publish

Collaborators

  • avatar