Skip to content

Commit

Permalink
docs: update ignore rules
Browse files Browse the repository at this point in the history
Adds bun lockfile, and points to the package.json docs as the
authoritative list for ignore rules in the cli docs.
  • Loading branch information
wraithgar committed Dec 2, 2024
1 parent 4bf1901 commit 1be8e95
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/lib/content/commands/npm-publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ See [`developers`](/using-npm/developers) for full details on what's
included in the published package, as well as details on how the package is
built.

See [`package.json`](/configuring-npm/package-json) for more info on
what can and can't be ignored.

### Configuration

<!-- AUTOGENERATED CONFIG DESCRIPTIONS -->
Expand Down
2 changes: 2 additions & 0 deletions docs/lib/content/configuring-npm/package-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ Some files are always ignored by default:
if you wish it to be published)
* `pnpm-lock.yaml`
* `yarn.lock`
* `bun.lockb`

Most of these ignored files can be included specifically if included in
the `files` globs. Exceptions to this are:
Expand All @@ -334,6 +335,7 @@ the `files` globs. Exceptions to this are:
* `package-lock.json`
* `pnpm-lock.yaml`
* `yarn.lock`
* `bun.lockb`

These can not be included.

Expand Down
7 changes: 5 additions & 2 deletions docs/lib/content/using-npm/developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ as `.gitignore` files:
* You can end patterns with a forward slash `/` to specify a directory.
* You can negate a pattern by starting it with an exclamation point `!`.

By default, the following paths and files are ignored, so there's no
need to add them to `.npmignore` explicitly:
By default, some paths and files are ignored, so there's no
need to add them to `.npmignore` explicitly. Some examples are:

* `.*.swp`
* `._*`
Expand Down Expand Up @@ -148,6 +148,9 @@ property of `package.json`, which is an array of file or directory names
that should be included in your package. Sometimes manually picking
which items to allow is easier to manage than building a block list.

See [`package.json`](/configuring-npm/package-json) for more info on
what can and can't be ignored.

#### Testing whether your `.npmignore` or `files` config works

If you want to double check that your package will include only the files
Expand Down

0 comments on commit 1be8e95

Please sign in to comment.