requirejs-rails
requirejs-rails copied to clipboard
Consider validation for config/requirejs.yml
At some point, it might be nice to have simple validation of config/requirejs.yml. I'm thinking this would be limited to known key names and their top-level types. E.g. if paths is nil-valued, that's an error.
Any runtime costs and errors thrown should only occur in development and at build time (e.g. in the rake task) by default, with the usual per-environment configuration.
A tool worth investigating towards this end is Kwalify, an engine that uses a schema (itself in YAML) to validate a YAML file such as config/requirejs.yml.
Also, it's worth considering whether/how this all fits in with the runtime (require.js) and build-time (r.js) key whitelists.