@namics/nitro-component-validator
v0.0.5
Published
A helper to validate a nitro component
Downloads
13
Readme
Nitro Component Validator
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);
}