Simple plugin to allow to load YAML files with r42. YAML is a very good looking syntax for configuration files and the like.

Getting started

npm install r42-yaml

Then, to activate the loader:


The module will then be available with the yaml prefix:

define(function(/*!yaml!$config*/ config) {
  // Use your structure here

Use another prefix than yaml

The function exported by js-yaml returns the loader function and can be passed true to prevent automatic registration of the plugin.

var r42 = require('r42');
r42.registerLoader('yamlalias', require('r42-yaml')(true));

// Now the loader will be accessible from yamlalias