How to debug .npmignore?
问题 How can package files (these to be published) be listed to debug records in .npmignore ? I'm looking for something like equivalent of git ls-files for .gitignore . The only way I have found so far is to pack the package and then list the archive which I find a bit clumsy: npm pack tar -tzf <package-id>.tgz 回答1: As Mike 'Pomax' Kamermans mentioned in comment the fact that .npmignore and .gitignore use the same syntax can be leveraged: git ls-files -co --exclude-per-directory=.npmignore The