Linux command
npm-run 命令
网络
复制后可按需替换文件名、目录或参数。
常用示例
Run script from package.json
npm run [script-name]
List available scripts
npm run
Run with arguments
npm run [script] -- [--flag]
Run silently
npm run [script] --silent
Run if exists
npm run [script] --if-present
说明
npm run executes scripts defined in package.json. Core workflow command. The command runs scripts section. Passes additional arguments after --.
参数
- --silent
- Suppress output.
- --if-present
- Don't fail if missing.
- --help
- Display help information.
FAQ
What is the npm-run command used for?
npm run executes scripts defined in package.json. Core workflow command. The command runs scripts section. Passes additional arguments after --.
How do I run a basic npm-run example?
Run `npm run [script-name]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --silent do in npm-run?
Suppress output.