Also, `YUI.add('name', factory)` won't work. The factory is returning a function, not adding properties to an object. It should be:
```js
var pathTo = factory():
YUI.add('name', function (Y) {
  Y.pathTo = pathTo;
});
```