JoshuaKGoldberg / package.json-validator

Tools to validate package.json files
MIT License
107 stars 26 forks source link

📝 Docs: Mention how to use in npm scripts #52

Open amilajack opened 8 years ago

amilajack commented 8 years ago

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

// package.json
{
  "scripts": {
    "test": "package-json-validator"
  }
}
amilajack commented 8 years ago

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

ntwb commented 6 years ago

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

LinusU commented 6 years ago

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

JoshuaKGoldberg commented 5 months ago

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