0.0.5 • Published 7 years ago

@namics/nitro-component-validator v0.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Nitro Component Validator

npm version Build Status Coverage Status Codestyle

This helper verifies that the pattern.json file of a component is valid

Installation

npm i --save-dev @namics/nitro-component-validator

Usage

const ComponentValidator = require('@namics/nitro-component-validator');
var validator = new PatternValidator();
try {
    validator.validateComponent({
      metaFile: 'components/atoms/button/pattern.json',
      data: {
        'name': 'button',
        'stability': 'alpha',
        'type': 'atom'
      }
    });
} catch(e) {
    console.log(e);
}