Coder Social home page Coder Social logo

package-compliant's Introduction

THIS REPO IS ARHIVED.

package-compliant

JavaScript Style Guide Build Status

Validate the support property in the package.json following the package-maintenance guidelines!

โš  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

package-compliant validate [--file|-f <file path>]

Validation applied:

  • โœ” 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!

License

Licensed under MIT.

package-compliant's People

Contributors

eomm avatar mhdawson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

package-compliant's Issues

cli as a module

Refactor in order to use this tool also as a module, not only as a CLI

Archive the repo

Since this has been superceeded by the support module in the pkgjs org I @Eomm can we archive this repo?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.