⚠ This project has been deprecated. Use @pkgjs/support instead.
Install
You can use this package as a CLI or as a Module if you need to use the core function of this module.
// As a CLI
npm i package-compliant -g
// As a module
npm i package-compliant
Commands
To run the commands you can execute:
package-compliant validate --file ./package-custom.json
// or simply in a project folder
package-compliant validate
// npx is supported of course
npx package-compliant validate
✔ Validate support property of the JSON --file if it exists. The default --file is the package.json in the directory where the command is executed.
Module
To use this package as a module you need to:
const packageCompliant = require('package-compliant')
const aPackageJson = require('./package.json')
try {
packageCompliant.validateSupportField(aPackageJson.support)
// the package is valid
} catch (err) {
// the package has some errors
}
// or you can use callback:
packageCompliant.validateSupportField(aPackageJson.support, (err, valid) => {
if (err) {
// there are some errors!!
}
})
Contributions
Read the CONTRIBUTING guidelines to start help us!
THIS REPO IS ARHIVED.
package-compliant
Validate the
supportproperty in thepackage.jsonfollowing the package-maintenance guidelines!⚠ This project has been deprecated. Use
@pkgjs/supportinstead.Install
You can use this package as a CLI or as a Module if you need to use the core function of this module.
Commands
To run the commands you can execute:
Validate
Validation applied:
supportproperty of the JSON--fileif it exists. The default--fileis thepackage.jsonin the directory where the command is executed.Module
To use this package as a module you need to:
Contributions
Read the CONTRIBUTING guidelines to start help us!
License
Licensed under MIT.