
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
npm-publish-files
Advanced tools
Copy special files `npm publish` always includes to a sub directory
❯ npx npm-publish-files --help
Usage: npm-publish-files [options] <dir>
Copy special files `npm publish` always includes to a sub directory
Options:
-V, --version output the version number
-f, --force overwrite existing files (default: false)
-c, --clean remove files instead of copying (default: false)
-i, --include <glob> glob for additional files (default: [])
-x, --exclude <glob> glob to prevent copying files (default: [])
-h, --help display help for command
If you want to build a large npm project into a sub folder dist/
, but then treat that as the root directory for the published package, you will need to copy all other special files npm includes in the publish. Let npm-publish-files
do that for you!
This script will make sure all necessary files are copied to dist/
before running npm publish
:
{
"scripts": {
"prepublishOnly": "npm-publish-files --force dist"
}
}
Any additional files specified in the "file" property of package.json will also be copied.
After this your are free to run npm publish dist
.
npm-publish-files
uses the npm-packlist package under the hood to determine which files to copy. Please read its readme to better understand the algorhithm.
To copy additional files, supply one or more globs with the --include
option. All matched files will be copied to <dir>
.
To exclude files from being copied, supply one or more globs with the --exclude
option. These will be applied last, so they filter both the default files, as well as those matched via the --include
option.
FAQs
Copy special files `npm publish` always includes to a sub directory
The npm package npm-publish-files receives a total of 36 weekly downloads. As such, npm-publish-files popularity was classified as not popular.
We found that npm-publish-files demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.