package.json-validator icon indicating copy to clipboard operation
package.json-validator copied to clipboard

📝 Docs: Mention how to use in npm scripts

Open amilajack opened this issue 8 years ago • 4 comments

A nice addition would be to use this as an npm script:

// package.json
{
  "scripts": {
    "test": "package-json-validator"
  }
}

amilajack avatar Jul 21 '16 21:07 amilajack

I think you need to add this as a .bin for this to work

amilajack avatar Jul 21 '16 21:07 amilajack

Would something like `"test": "npx package-json-validator -w -r --spec npm package.json" work if you're using > npm 5.x

ntwb avatar Jan 06 '18 05:01 ntwb

You should be able to just use "test": "pjv", since that is the name of the bin:

https://github.com/gorillamania/package.json-validator/blob/fd9578d6f0cd66c57cda64f09b2b10a5ae562824/package.json#L52

LinusU avatar Jan 06 '18 17:01 LinusU

Marking as a docs issue. Let's add a mention to the README.md of how to do this!

JoshuaKGoldberg avatar Mar 28 '24 12:03 JoshuaKGoldberg