As a list of files in curdir npm .gitignore and .npmignore are not ignored

How to view the list of files in the current directory to be published npm publish, in other words, those files that are not ignored by the ignoring rules .gitignoreand .npmignore.

I expect a specific command line or module / function Node.js to do the job.

+4
source share
1 answer

I don't know if this really helps, but look at the field https://docs.npmjs.com/files/package.json#filesfiles package.json

In filesyour field package.jsonyou can specify which files will be published.

, , files, .gitignore, .npmignore. .

+2

Source: https://habr.com/ru/post/1609960/


All Articles