js-dxtools/webpack-validator

Support custom schema with CLI

kentcdodds opened this issue ยท 1 comments

I envision something like:

webpack-validator webpack.config.js --schema-extension ./other/my-schema.js

Where ./other/my-schema.js is simply a module that exports the schema:

const validate = require('webpack-validator')
const Joi = require('webpack-validator').Joi
module.exports = Joi.object({
  eslint: Joi.any()
})

Thinking about it further, it would be nice to be able to configure all options via the CLI ๐Ÿ‘

we probably need yet another rc-file. (webpack-validatorrc.js ๐Ÿ™ˆ; needs to have Js for the schemaExtension). The thought of yet another meta file pains me but I see no better solution. ๐Ÿ˜