3 ms·
There's an easy way to prevent credential leakage when publishing to npm => Explicitly list the files to include in the package through the `files` property in
by mofle 11y ago
There's an easy way to prevent credential leakage when publishing to npm => Explicitly list the files to include in the package through the `files` property in package.json.
Docs: https://docs.npmjs.com/files/package.json#files https://docs.npmjs.com/files/package.json#files
Example: https://github.com/sindresorhus/got/blob/2f5d5ba94d625802880b3c793c3c1aa7798d0533/package.json#L29-L31 https://github.com/sindresorhus/got/blob/2f5d5ba94d625802880...
- Killswitch 11y agoI have taken to this route. It also clears out the cruft to bring dependency directory size down. Your module doesn't need .editorconfig or README.md and other stuff to run, remove it from the published stuff.