config-schema

0.0.3 • Public • Published

config-schema

Build Status

A lightweight wrapper for configuration options using JSON schema.

example

This is an example, lifted from ship:

@configSchema = new ConfigSchema()
 
@configSchema.schema.projectRoot =
  required: true
  default: './'
  type: 'string'
  description: 'The path to the root of the project to be shipped.'
@configSchema.schema.sourceDir =
  required: true
  default: './public'
  type: 'string'
  description: ''
@configSchema.schema.ignore =
  required: true
  default: ['ship*.opts']
  type: 'array'
  description: 'Minimatch-style strings for what files to ignore. This can be repeated to add multiple ignored patterns.'

Readme

Keywords

Package Sidebar

Install

npm i config-schema

Weekly Downloads

1

Version

0.0.3

License

GPLv3

Last publish

Collaborators

  • slang