How does npm publish ignore files?

when using npm to publish a package, there are some files under the current folder that you do not want to publish, such as the node_modules folder. You must install and rely on them when you test them. It is obviously not good to release these files as well.
do you have to put the files you need in another folder or delete files that don"t need to be published every time you publish?

is there any configuration to ignore some folders when publishing the package?
is like .gitignore in git.

Mar.04,2021

blacklist mode: .npmlists files, use .gitignore files without .npmlists.
whitelist mode: configure files field in package.json


https://cnodejs.org/topic/58b.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf26fc-31e00.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf26fc-31e00.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?