Repository navigation
Create .npmignore for npm publishing - #8
Conversation
Agent-Logs-Url: https://github.com/Coderrob/typescript-type-guards/sessions/c0985e1f-149d-4498-bf97-12cd09926dc7 Co-authored-by: Coderrob <7213776+Coderrob@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adjusts npm publishing behavior by adding an npm publishConfig and introducing a .npmignore file to control what gets included/excluded in the published package.
Changes:
- Add
publishConfig.access: "public"topackage.json. - Add a new
.npmignorewith exclusions for sources, config, CI files, coverage, and certain build artifacts.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| package.json | Adds publishConfig intended to influence npm publish access level. |
| .npmignore | Introduces ignore rules intended to reduce what gets published to npm. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/Coderrob/typescript-type-guards/sessions/7d1b22e5-7333-4186-989d-d6aa2fb02765 Co-authored-by: Coderrob <7213776+Coderrob@users.noreply.github.com>
Applied both changes in commit
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Prepares the package for npm publishing by ensuring only compiled output is shipped.
Changes
package.jsonNo changes —
publishConfig.accesswas evaluated but removed as it is only applicable to scoped packages and this package is unscoped (typescript-type-guards)..npmignore(new)Introduces a minimal
.npmignorethat excludes build artifacts (*.tsbuildinfo,*.js.map) from within thedist/directory. The existing"files": ["dist"]whitelist inpackage.jsonalready handles root-level exclusions, so the.npmignorecomplements it with a clarifying comment and targets only artifacts that could appear insidedist/.