This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
config-schema with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
A lightweight wrapper for configuration options using JSON schema.
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.'