0.0.3 • Published 8 years ago

tv4-loader v0.0.3

Weekly downloads
2
License
ISC
Repository
-
Last release
8 years ago

tv4-loader

Webpack loader for validating json files against a schema file. Can be used in combination with json-loader.

Usage

module: {
  preLoaders: [
    {
      test: path.join(__dirname, 'some-json-file.json'),
      loader: 'tv4',
      query: {
        schema: path.join(__dirname, 'some-schema.json'),
      }
    }
  ],
  loaders: [
    {
      test: /\.json$/,
      loader: 'json'
    }
  ]
}

Query Parameters

Known Limitations

  • schema needs to be an absolute path to the schema file.

License

MIT