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!
npm install --save-dev npm-publish-files
This script will make sure all necessary files are copied to
dist/ before running
After this your are free to run
npm publish dist.
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]
npm-publish-files chooses the files to copy according to the npm docs.