Skip to content

Commit 060c2ce

Browse files
committed
docs: clarify ignore/files rules
1 parent ff1204a commit 060c2ce

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

docs/lib/content/configuring-npm/package-json.md

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -291,25 +291,40 @@ Certain files are always included, regardless of settings:
291291

292292
`README` & `LICENSE` can have any case and extension.
293293

294-
Conversely, some files are always ignored:
294+
Some files are always ignored by default:
295295

296+
* `*.orig`
297+
* `.*.swp`
298+
* `.DS_Store`
299+
* `._*`
296300
* `.git`
297-
* `CVS`
298-
* `.svn`
301+
* `.npmrc`
299302
* `.hg`
300303
* `.lock-wscript`
304+
* `.npmrc`
305+
* `.svn`
301306
* `.wafpickle-N`
302-
* `.*.swp`
303-
* `.DS_Store`
304-
* `._*`
307+
* `CVS`
308+
* `config.gypi`
309+
* `node_modules`
305310
* `npm-debug.log`
311+
* `package-lock.json` (use
312+
[`npm-shrinkwrap.json`](/configuring-npm/npm-shrinkwrap-json)
313+
if you wish it to be published)
314+
* `pnpm-lock.yaml`
315+
* `yarn.lock`
316+
317+
Most of these ignored files can be included specifically if included in
318+
the `files` globs. Exceptions to this are:
319+
320+
* `.git`
306321
* `.npmrc`
307322
* `node_modules`
308-
* `config.gypi`
309-
* `*.orig`
310-
* `package-lock.json` (use
311-
[`npm-shrinkwrap.json`](/configuring-npm/npm-shrinkwrap-json) if you wish
312-
it to be published)
323+
* `package-lock.json`
324+
* `pnpm-lock.yaml`
325+
* `yarn.lock`
326+
327+
These can not be included.
313328

314329
### main
315330

0 commit comments

Comments
 (0)