API Docs for: 0.2.0
Show:

express-yui_lib_patches_templates-requires Module

Patches Y.Loader to support templates requirements, which enables you to require templates easily without having to know the name of the module generated by the build transpiler/plugin/task while define modules.

You can write your modules like this:

YUI.add('name', function (Y) {
    // module code...
}, '0.1', { requires: [], templates: ['foo'] });

And you can enable the patch like this:

app.yui.patch(require('express-yui/lib/patches/templates-requires'));

This will guarantee, that the template denotated by the logical name foo will be loaded. Of course, it will be loaded based on the transpiler output, which generates a more complex module name. If you don't use this patch, you will have to use the full name of the generated module.