Skip to content

verify packed files #30

Description

@shanewilson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions