{
"scripts": {
"lint": "eslint src tools && jscs src tools --verbose",
"csslint": "csscomb src/components --lint --verbose",
}
The above code is just an example. What I want to ask is what does the parameter passed later mean relative to the script? Are the parameter names customized? Is the way to pass parameters through CLI the writing format of npm run lint -- --verbose
?
cli is missing a
run
, right?You can refer to this article by Ruan Yifeng
http://www.ruanyifeng.com/blo...
Add the usage of passing parameters: I have never used lint. Let me talk about my local experiment. First of all, the basic usage I want to use is to use the command line
Then I switched to package.json:
If I just
npm run run
actually only execute the qls method in the end, but as I said earlier, my command line needs to take other sub-commands or parameters, then I can pass them in through--
, as follows: