0.1.0 • Published 10 years ago
r42-yaml v0.1.0
js-yaml
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:
require('r42-yaml')();
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
0.1.0
10 years ago