Linux command
npm-fund 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
List all dependencies looking for funding
npm fund
Show funding info for a specific package
npm fund [package-name]
Output funding information as JSON
npm fund --json
Open a specific funding URL when multiple sources exist
npm fund [package-name] --which [1]
List funding info for a specific workspace
npm fund --workspace [workspace-name]
说明
npm fund retrieves information on how to fund the dependencies of a given project. If no package name is provided, it lists all dependencies that are looking for funding in a tree structure showing the type of funding and URL to visit. If a package name is provided, it tries to open its funding URL using the configured browser. If there are multiple funding sources for the package, the user will be instructed to pass the --which option to disambiguate.
参数
- --json
- Output JSON data rather than the normal output.
- --which _NUM_
- When there are multiple funding sources, specifies which 1-indexed source URL to open.
- --browser _BROWSER_
- Browser to use for opening funding URLs. Set to false to print URLs to terminal instead.
- --unicode
- Use unicode characters in tree output. When false, uses ASCII characters instead.
- --workspace _WORKSPACE_
- Filter results to the specified workspace(s).
FAQ
What is the npm-fund command used for?
npm fund retrieves information on how to fund the dependencies of a given project. If no package name is provided, it lists all dependencies that are looking for funding in a tree structure showing the type of funding and URL to visit. If a package name is provided, it tries to open its funding URL using the configured browser. If there are multiple funding sources for the package, the user will be instructed to pass the --which option to disambiguate.
How do I run a basic npm-fund example?
Run `npm fund` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --json do in npm-fund?
Output JSON data rather than the normal output.