shanewilson / repkgs

10 stars 0 forks source link

verify packed files #30

Open shanewilson opened 4 years ago

shanewilson commented 4 years ago

bin files included if declared and found main file included if declared and found

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. 🤷🏻‍♂️

shanewilson commented 4 years ago

npm has a package that gives an api for finding what files go in a pack - shoudl use that. Can't find it now though =\

shanewilson commented 4 years ago

https://github.com/npm/npm-packlist#interaction-between-packagejson-and-npmignore-rules