bin files included if declared and found
main file included if declared and found
main defaults to index.js when the module is required but index.js is not automatically included in pack
files defaults to [*] but really it is [**]
https://docs.npmjs.com/files/package.json#directories
directories is another way to add files - but doesn't really seem thought through so not going to support it for now.
dealing with .npmignore:
https://docs.npmjs.com/files/package.json#files
You can also provide a .npmignore file in the root of your package or in subdirectories, which will keep files from being included. At the root of your package it will not override the “files” field, but in subdirectories it will. The .npmignore file works just like a .gitignore. If there is a .gitignore file, and .npmignore is missing, .gitignore’s contents will be used instead.
whitelist = files array + main if declared and found + bin if declared and found
blacklist = .gitignore at root, .npmignore at each dir level.
dealing with .npmignore seems annoying.
blacklist seems annoying. Maybe leave this out for now. 🤷🏻♂️
binfiles included if declared and foundmainfile included if declared and foundmaindefaults toindex.jswhen the module is required butindex.jsis not automatically included in packfilesdefaults to[*]but really it is[**]https://docs.npmjs.com/files/package.json#directories
directories is another way to add files - but doesn't really seem thought through so not going to support it for now.
dealing with .npmignore:
https://docs.npmjs.com/files/package.json#files
whitelist = files array + main if declared and found + bin if declared and found
blacklist = .gitignore at root, .npmignore at each dir level.
dealing with .npmignore seems annoying.
blacklist seems annoying. Maybe leave this out for now. 🤷🏻♂️