diff options
Diffstat (limited to 'deps/npm/doc/files/package.json.md')
-rw-r--r-- | deps/npm/doc/files/package.json.md | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md index 1b2b04fe2f..071d23a415 100644 --- a/deps/npm/doc/files/package.json.md +++ b/deps/npm/doc/files/package.json.md @@ -168,14 +168,23 @@ npm also sets a top-level "maintainers" field with your npm user info. ## files -The "files" field is an array of files to include in your project. If -you name a folder in the array, then it will also include the files -inside that folder. (Unless they would be ignored by another rule.) - -You can also provide a ".npmignore" file in the root of your package or -in subdirectories, which will keep files from being included, even -if they would be picked up by the files array. The `.npmignore` file -works just like a `.gitignore`. +The optional "files" field is an array of file patterns that describes +the entries to be included when your package is installed as a +dependency. If the files array is omitted, everything except +automatically-excluded files will be included in your publish. If you +name a folder in the array, then it will also include the files inside +that folder (unless they would be ignored by another rule in this +section.). + +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. + +Files included with the "package.json#files" field _cannot_ be excluded +through `.npmignore` or `.gitignore`. Certain files are always included, regardless of settings: |